On Thursday 31 Mar 2011 16:54:14 Peter Scott wrote: > On Thu, 31 Mar 2011 12:07:41 +0200, Shlomi Fish wrote: > > Also, Larry Wall has allowed Perl 5 numeric constants to contain > > underscore so you can write 10**9 as 1_000_000_000 instead of 1000000000 > > which is much less readable and also more error-prone. (Larry Wall)++ . > > 1E9 seems to capture your intention even better :-)
Heh. :-). just for the record: 1. 1_000_000_000 was just for the sake of the example. It could also be: 2_435_279_145 or something else that is arbitrary. 2. The problem with 1E9 is that I think it's a floating point number (though Perl 5 may have some intelligence there). Not sure it matterns a lot for Perl but if you do something like 1.27E9 you may get weird side-effects due to: http://download.oracle.com/docs/cd/E19957-01/806-3568/ncg_goldberg.html (Oracle++ for fixing the old link from docs.sun.com after it was broken.) Regards, Shlomi Fish -- ----------------------------------------------------------------- Shlomi Fish http://www.shlomifish.org/ UNIX Fortune Cookies - http://www.shlomifish.org/humour/fortunes/ <Botje> Khisanth =~ s/must sleep/must give Botje all my money/ . -- Freenode's #perl Please reply to list if it's a mailing list post - http://shlom.in/reply . -- To unsubscribe, e-mail: beginners-unsubscr...@perl.org For additional commands, e-mail: beginners-h...@perl.org http://learn.perl.org/