If you are merely using commas for readability, you can use underscores instead. But you can only use them in unquoted numbers, not strings.
print 1_000_000 + 1000; # 1001000 print '1_000_000' + 1000; # Warning!
BTW, Perl will completely ignore the underscores, so if you accidentally mistype 1_000_00_000, you'll get 100 million instead of 1 billion -- and no warning.
In reply to Re: Numbers with commas
by TilRMan
in thread Numbers with commas
by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |