XP is just a number | |
PerlMonks |
Re: Passing ouput between programby synapse0 (Pilgrim) |
on Jul 16, 2001 at 16:07 UTC ( [id://96999]=note: print w/replies, xml ) | Need Help?? |
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 Which could just as easily be: 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
In Section
Seekers of Perl Wisdom
|
|