Well, asking the sage advice of the
One True Perl Guru,
Guru perldoc (
perldoc -f open from the cmd line), we find this:
If MODE is `'|-'', the filename is interpreted as
a command to which output is to be piped, and if
MODE is `'-|'', the filename is interpreted as a
command which pipes output to us. In the
2-arguments (and 1-argument) form one should
replace dash (`'-'') with the command. See the
Using open() for IPC entry in the perlipc manpage
for more examples of this. (You are not allowed
to `open' to a command that pipes both in and out,
but see the IPC::Open2 manpage, the IPC::Open3
manpage, and the Bidirectional Communication entry
in the perlipc manpage for alternatives.)
and this example
open(ARTICLE, '-|', "caesar <$article") # decrypt article
+
or die "Can't start caesar: $!";
Which could just as easily be:
open(FH, '-|', "myscript.pl") or die "He's dead, Jim :$!";
while(<FH>) {
do whatever with output form myscript
}
close(FH);
So, you can snarf info from one scripts output to your script using this method, or one of the IPC::OpenX methods.
Hopefully, that'll give some help.
-Syn0