underscores in numeric constants (was: how to truncate lines)

52 views
Skip to first unread message

Joe Wells

unread,
Feb 22, 1991, 12:59:57 PM2/22/91
to
lw...@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 <j...@bu.edu>

Larry Wall

unread,
Feb 22, 1991, 1:35:34 PM2/22/91
to
In article <JBW.91Fe...@bigbird.bu.edu> j...@bigbird.bu.edu (Joe Wells) writes:

: lw...@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

Reply all
Reply to author
Forward
0 new messages