August 1999 | Return to the Perl Hardware Store | Slide #22 |
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.')
(Larry Wall says ``That's sick!'')
The main trick was
sub FETCH { $_[1]; }
Next | Copyright © 1999 M-J. Dominus |