We don't bite newbies here... much | |
PerlMonks |
Re: How to do that with eval ?by ysth (Canon) |
on Apr 11, 2004 at 05:59 UTC ( [id://344207]=note: print w/replies, xml ) | Need Help?? |
In general, if you have problems with eval, make sure you print the error message in $@ if the eval fails along with the string you are evaling; that will usually help pinpoint the error.
In designing the code in the first place, instead of randomly tossing together "" or '' and $variables, decide what you want the evaled code to look like for given input and then write the code to produce that string, paying attention to the different interpolation rules of '' or "".
In Section
Seekers of Perl Wisdom
|
|