On Thu, Nov 14, 2002 at 10:28:38AM -0800, Michael Lazzaro wrote: > 01_._23 # wrong?
this one has to be wrong by Larry's decree that _ is only valid between "digits" (hexits?) > 1.23_e_4 # ok? Hrm. This one is annoying, but I think it should be okay. > 20:1.G.K # base 20 (identical?) > 20:1_G_K # base 20 (identical?) > 20:1.16.19 # base 20 (identical?) > 20:1_16_19 # base 20 (identical?) If we used _ to separate digits in the explicit radix format then that would free up . to be used for floating point numbers (I still don't see a use for non-decimal floating point representations, but that's probably just my lack of imagination). It sort of makes sense too in that _ can only appear between digits in regular decimal format. > Of course, a key issue is that, in perl5, the treatment of numeric > literals is not at all the same as the treatment of stringified > numerics. For example: > > 0x00ff # hex value ff > '0x00ff' # integer value 0, with trailing 'x00ff' > > I think ways to solve this should be open to discussion. Hopefully > Luke can give us some proposals, since he's writing that part. Would that there were a way to "literalize" strings. Maybe we should just have a function called that: $string = <FH>; # say it reads 0xff $num = literalize($string) # $num now = 255 -Scott -- Jonathan Scott Duff [EMAIL PROTECTED]