in reply to Re: batch processing via single open
in thread batch processing via single open
I am to run this perl file from shell for every file in a large corpus (I have to, because this is only a small part of a large project. Execution continues with various other languages and scripts and so on afterwards), not from another perl file. So daxim's highly sophisticated code is unfortunately useless to me.
As you said, "require" would not bring me much advantage because upon finishing execution, even if I do not close() the connection, it will be auto-closed. And while processing the next file, same perl code will be executed and also "require"d file will be executed again.
Roughly, I want to have the following:
db.pl
open2 (\*INP, \*OUTP, 'path_to_external_program'); print "included"; 1;
require "db.pl"; $file = $ARGV[0] #the next file to process print OUTP some_command_using_$file; #exec some cmds on external prog #more lines follow afterwards
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^3: batch processing via single open
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 | |
by shmem (Chancellor) on Jul 17, 2007 at 17:52 UTC | |
|