M
Madhu Ramachandran
question.
i am perl newbie. i read that system() call can be used to invoke other
program (shell scripts etc). The return code of the program is returned by
system() call and i have to >> by 8 bits.
is there any variable which will contain ouput printed by the program in
system() call?
eg:
system("mytest.sh");
if mytest.sh has echo "bla" in it. how can i capture the 'bla' value, using
the system() call?
currently iam doing this.
system ("mytest.sh > /tmp/outfile");
# I open this /tmp/outfile and use $line = <outFp>; and get the value.
wondering if there is an easier way to get output.
-Madhu
i am perl newbie. i read that system() call can be used to invoke other
program (shell scripts etc). The return code of the program is returned by
system() call and i have to >> by 8 bits.
is there any variable which will contain ouput printed by the program in
system() call?
eg:
system("mytest.sh");
if mytest.sh has echo "bla" in it. how can i capture the 'bla' value, using
the system() call?
currently iam doing this.
system ("mytest.sh > /tmp/outfile");
# I open this /tmp/outfile and use $line = <outFp>; and get the value.
wondering if there is an easier way to get output.
-Madhu