Re: running perl script from inside another script & collecting output in array

2011-09-15 Thread Peter Scott
On Wed, 14 Sep 2011 21:07:31 -0700, Rajeev Prasad wrote: > thecalledscript.pl needs a filename as argument. > > here is how i am calling it from a thecalling_script: > > > > { >     local @ARGV; >     @ARGV = ("$filename"); >     require "thecalledscript.pl"; > } > > issue is, the called scri

Re: running perl script from inside another script & collecting output in array

2011-09-15 Thread Shawn H Corey
On 11-09-15 01:07 AM, Jeff Pang wrote: 15 сентября 2011, 08:38 от Rajeev Prasad: I am now using: my @outfiles = `thecalledscript.pl $filename`; i am getting right results. now question is: is this the best method in terms of efficiency? Not the good way. It's better to write the called

Re[2]: running perl script from inside another script & collecting output in array

2011-09-14 Thread Jeff Pang
15 сентября 2011, 08:38 от Rajeev Prasad : > I am now using: > > my @outfiles = `thecalledscript.pl $filename`; > > i am getting right results. > > now question is: is this the best method in terms of efficiency? > Not the good way. It's better to write the called script as a module, then u

Re: running perl script from inside another script & collecting output in array

2011-09-14 Thread Brandon McCaig
On Thu, Sep 15, 2011 at 12:07 AM, Rajeev Prasad wrote: > here is how i am calling it from a thecalling_script: *snip* >     require "thecalledscript.pl"; *snip* > issue is, the called script prints some filenames after completion to STDOUT. > how can i collect them into an array variable? You co

Re: running perl script from inside another script & collecting output in array

2011-09-14 Thread Rajeev Prasad
: running perl script from inside another script & collecting output in array i am doing like below: thecalledscript.pl needs a filename as argument. here is how i am calling it from a thecalling_script: {     local @ARGV;     @ARGV = ("$filename");     require "thecalledscri

running perl script from inside another script & collecting output in array

2011-09-14 Thread Rajeev Prasad
i am doing like below: thecalledscript.pl needs a filename as argument. here is how i am calling it from a thecalling_script: {     local @ARGV;     @ARGV = ("$filename");     require "thecalledscript.pl"; } issue is, the called script prints some filenames after completion to STDOUT. how