in reply to Re: Perl System('') question
in thread Perl System('') question

Hi, i would like give some more information on this, if the output is more then one line, then use array to get the output.
my @output = qx(/usr/bin/eject -n);

If you want to use system function then you can redirect your output to a file and read the file content. it might useful, when you running a program as a daemon.
The backtick and qx are same, you can use the following option to check your code.
perl -MO=Deparse <scriptname>.

Replies are listed 'Best First'.
Re^3: Perl System('') question
by parv (Parson) on Nov 29, 2008 at 05:57 UTC
    What would be the purpose of B::Deparse output? Just use the -c option to check syntax: perl -c file.