You managed to not read or not understand the documentation. The relevant paragraph in perlfunc's do-item is:
do 'stat.pl';
is just like
eval `cat stat.pl`;
except that it's more efficient and concise, keeps track of the current filename for error messages, searches the @INC libraries, and updates %INC if the file is found. See "Prede- fined Names" in perlvar for these variables. It also differs in that code evaluated with do FILENAME cannot see lexicals in the enclosing scope; eval STRING does. It's the same, however, in that it does reparse the file every time you call it, so you probably don't want to do this inside a loop.
- Yes, I reinvent wheels.
- Spam: Visit eurotraQ.
In reply to Re: "do" what?
by Juerd
in thread "do" what?
by cLive ;-)
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |