P is for Practical | |
PerlMonks |
comment on |
( [id://3333]=superdoc: print w/replies, xml ) | Need Help?? |
I would really, really suggest replacing the eval() with something like
This is on the hypothesis that in fat-fingering in your example you reversed the slope of a back slash. When obscure code fails it is really hard to debug. I infer from your eval() example that what you are trying to do is this:
If these are correct, the above code should implement it in an easier-to-read-and-debug manner. The three statements compute the name of the module, get the address of the subroutine in that module (failing if it can not be found), and call the subroutine, passing it the line from the file, and storing the result in $temp. This is off-topic for your question, but all your Perl should have use strict; and use warnings; near the top of the file. If your script does not do this, all sorts of bugs could lurk. Of course, if you just slam these into a legacy script it may find all sorts of things -- more than you are able to fix in one sitting. But it's worth a try -- one of the warnings/errors may tell you what your problem is. In reply to Re^3: Parsing Problems
by Anonymous Monk
|
|