our $ALREADY_CONNECTED = 0; # this var's purpose is called a semaphore DOCUMENT: for my $document (@collection) { if (!$ALREADY_CONNECTED) { open2(...); # and save the handles for later usage $ALREADY_CONNECTED = 1; # whoa! magic! redo DOCUMENT; } else { # blah blah process $document here, # the in/out handles exist. }; };
In reply to Re^3: batch processing via single open
by daxim
in thread batch processing via single open
by karden
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |