Just another Perl shrine | |
PerlMonks |
comment on |
( [id://3333]=superdoc: print w/replies, xml ) | Need Help?? |
Hi Robert, 'do' ... seemed to work at first for me but is acting wonky There are some differences between do and eval, maybe that's the problem? "do 'stat.pl'; is largely like eval `cat stat.pl`; except that it's more concise, runs no external processes, keeps track of the current filename for error messages, searches the @INC directories, and updates %INC if the file is found. ... It also differs in that code evaluated with do FILE cannot see lexicals in the enclosing scope; eval STRING does." Also do requires some more error checking to figure out what went wrong if the file doesn't compile/run, see do. Hope this helps, In reply to Re^3: perlcritic compliant way to eval?
by haukex
|
|