XP is just a number | |
PerlMonks |
Re: Probably an easy one - store command in variable.by nobull (Friar) |
on Sep 15, 2005 at 16:50 UTC ( [id://492327]=note: print w/replies, xml ) | Need Help?? |
The simple (and wrong) answer is, of course, eval.
Any variable declared within and eval(STRING) will go out of scope at the end of the eval(). Perhaps you should take a step back and say why you think that you want to do this. I suspect the thing you are really looking for is the anonymous subroutine.
In Section
Seekers of Perl Wisdom
|
|