LetMeAsk has asked for the wisdom of the Perl Monks concerning the following question:
Hi,
i am newbie to perl and coded a small perl program with the below objective as follows:
- 1. Triggering another script(ThirlPartyScript.start) from this perl.
- 2. Directing the output of that script in a file such that only those lines are stored which match a string.
- 3. Mail the file generated at the step 2.
Can someone let me know how to supply that iterative argument when calling a script from perl so that the called script completes? Thanks#Run the command open( CMD, "$run_cmd|" ) || die "Not able to run \"$run_cmd\":$!\n"; while( <CMD> ){ # read command's output from the pipe # do write to file with what we read back from the proces print $fh_cmd_in $_; }
|
---|
Replies are listed 'Best First'. | |
---|---|
Re: How to call a script interactively from perl
by BrowserUk (Patriarch) on Oct 08, 2012 at 22:07 UTC | |
Re: How to call a script interactively from perl
by zentara (Archbishop) on Oct 09, 2012 at 12:09 UTC | |
by LetMeAsk (Initiate) on Oct 15, 2012 at 21:14 UTC | |
by zentara (Archbishop) on Oct 16, 2012 at 11:07 UTC | |
by LetMeAsk (Initiate) on Oct 16, 2012 at 14:34 UTC | |
by McA (Priest) on Oct 16, 2012 at 14:44 UTC | |
| |
Re: How to call a script interactively from perl
by Illuminatus (Curate) on Oct 08, 2012 at 21:21 UTC |
Back to
Seekers of Perl Wisdom