Next | Tricks of the Wizards | 65 |
Here's Eval::FETCH
sub FETCH { my ($self, $key) = @_; $key; # Do NOTHING! }
What was that all about?
use Eval;
$salary = 43_000; print "After your raise, you will make $Eval{$salary*1.06}.\n";
After your raise, you will make 45580.
If you don't like the syntax, you can change it a little:
use Eval => ':';
$salary = 43_000; print "After your raise, you will make $:{$salary*1.06}.\n";
After your raise, you will make 45580.
Next | Copyright © 2003 M. J. Dominus |