Am I looking for something like PHP's require_once?You are looking for require. If a file is succesfully imported via require, it won't be imported again during the program's lifetime. On subsequent calls require'ing the same file just returns 1 (or some other bizarre but "true" value).
From your post the calling semantics are not clear to me. "My perl file is executed for every document in a large collection" - how is this perl file invoked? from a shell, from perl itself? If you are invoking perl anew for each file in the set (and exiting perl when done) you won't gain much with require.
If you showed some code it would be easier to help you. See How (Not) To Ask A Question.
--shmem
_($_=" "x(1<<5)."?\n".q·/)Oo. G°\ /
/\_¯/(q /
---------------------------- \__(m.====·.(_("always off the crowd"))."·
");sub _{s./.($e="'Itrs `mnsgdq Gdbj O`qkdq")=~y/"-y/#-z/;$e.e && print}
In reply to Re: batch processing via single open
by shmem
in thread batch processing via single open
by karden
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |