in reply to batch processing via single open
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}
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: batch processing via single open
by karden (Novice) on Jul 16, 2007 at 17:41 UTC | |
by shmem (Chancellor) on Jul 16, 2007 at 21:50 UTC | |
by karden (Novice) on Jul 16, 2007 at 22:35 UTC | |
by shmem (Chancellor) on Jul 17, 2007 at 17:01 UTC | |
by karden (Novice) on Jul 17, 2007 at 17:39 UTC | |
|