Larry Wall skribis 2005-03-17 21:06 (-0800):
> oct and hex are arguably misnamed, since most functions are named by
> what they produce, not by what they take as input.  I don't know what
> the replacement should be, though.  Maybe it's not worth fixing.

+"0x$_"  # hex
+"0o$_"  # oct
+"0b$_"  # bin (does not exist in Perl 5)

This does require that strings numify the same way literals do, but I
think that's a sane approach anyhow. Now that leading 0 no longer means
the number is octal, I can't think of a good reason to keep the contrast
between literal strings numified during compile time and variable
strings during runtime.


Reply via email to