[comp.lang.perl] underscores in numeric constants

jbw@bigbird.bu.edu (Joe Wells) (02/23/91)

lwall@jpl-devvax.JPL.NASA.GOV (Larry Wall) writes:

   perl -e 'print "*" x 1_000_000, "\n"' | perl -pe 'chop; $_=substr($_,0,80)."\n"'
                         ^   ^

How long has this been in the language?  (The ability to put as many
underscores as you want in the middle of a numeric constant.)  When was it
added?

??????

-- 
Joe Wells <jbw@bu.edu>

lwall@jpl-devvax.JPL.NASA.GOV (Larry Wall) (02/23/91)

In article <JBW.91Feb22125957@bigbird.bu.edu> jbw@bigbird.bu.edu (Joe Wells) writes:
: lwall@jpl-devvax.JPL.NASA.GOV (Larry Wall) writes:
: 
:    perl -e 'print "*" x 1_000_000, "\n"' | perl -pe 'chop; $_=substr($_,0,80)."\n"'
:                          ^   ^
: 
: How long has this been in the language?  (The ability to put as many
: underscores as you want in the middle of a numeric constant.)  When was it
: added?

As near as I can recall, it's been in there since before version 2.
It's there as a sop to former Ada programmers.  :-)

Larry