Next | The Perl Hardware Store | DC.pm Version | 17 |
This nifty trick was invented by Andrew Pimlott
Beginners always want to say this:
$salary = 43_000; print "After your raise, you will make $salary*1.06.\n";
Of course, expressions aren't evalauted inside of strings.
After your raise, you will make 43000*1.06.
Or are they?
@s = (1, 4, 9, 16, 25, 36); print "$s[(2+7-1*3)/2]\n"; # Prints 16
Next | Copyright © 2003 M. J. Dominus |