Next | The Perl Hardware Store | DC.pm Version | 59 |
In Part I, we saw Andrew Pimlott's trick:
use Eval;
print "6 * 7 + 53 is $eval{6 * 7 + 53}.\n";
(prints `6 * 7 + 53 is 95.')
Or alternatively:
use Eval ':';
print "Brain D Foy in lowercase is $:{lc 'Brain D Foy'}.\n";
(prints `Brain D Foy in lowercase is brain d foy.')
The main trick was
sub FETCH { $_[1]; }
Next | Copyright © 2003 M. J. Dominus |