# out blanks, underscores and dashes. The complication stems from the
# grandfathered-in 'L_', which retains a single trailing underscore.
+# integer or float (no exponent)
+my $integer_or_float_re = qr/ ^ -? \d+ (:? \. \d+ )? $ /x;
+
+# Also includes rationals
+my $numeric_re = qr! $integer_or_float_re | ^ -? \d+ / \d+ $ !x;
+ return $_[0] if $_[0] =~ $numeric_re;
+
(my $loose = $_[0]) =~ s/[-_ \t]//g;
return $loose if $loose !~ / ^ (?: is | to )? l $/x;