pegasus has asked for the wisdom of the Perl Monks concerning the following question:
Hi,
I'm working my way through "Learning Perl" and ran into something on page 140, where they discuss modifying timestamps. $atime = $mtime = 700_000_000;
This seemed weird to me, so I tried it out.
!#/usr/bin/perl my $atime; my $ntime; $atime = $mtime = 700_000_000; print "atime = $atime\nmtime = $mtime\n";
This works with or without the underscores.
I've seen the underscores used in several places (books, articles, etc). What's the significance of the underscores and (since Perl seems to work without them) why do people use them? Is it just a visual convenience?
|
---|
Replies are listed 'Best First'. | |
---|---|
Re: Underscores in numbers
by damian1301 (Curate) on Apr 12, 2001 at 21:42 UTC | |
Re: Underscores in numbers
by suaveant (Parson) on Apr 12, 2001 at 21:43 UTC |