Perl: the Markov chain saw | |
PerlMonks |
comment on |
( [id://3333]=superdoc: print w/replies, xml ) | Need Help?? |
The problem here is that your "\n" line ending within your eval string are being interpolated before the string is eval'd. Effectively, you are double spacing your lines of code. escaping the "\n"s, make the problem go away.
I've fairly recently started coding my (rare) uses of eval like this.
This allows you to get very useful error messages from within the evals, telling you not only which line number within the eval failed and why, but also the package name and line number at which the eval is located. Not so important when the eval is in main as here, though knowing which line number is useful if there are more than one in the file, but it really comes into it's own when the eval is located in a module. Examine what is said, not who speaks.
"Efficiency is intelligent laziness." -David Dunham"Think for yourself!" - Abigail Hooray! In reply to Re: Re: Re: Line Numbers
by BrowserUk
|
|