Silky Manwani wrote:
> Hello,
> 
> Back with the system command but with a different problem.
> 
> I am calling a program with the system command which has arguments.
> This program returns a string and I need to capture it.
> 
> @args("command","arg1","arg2");
> $res = system(@args);
> 
> print $res;
> 
> It prints 0;
        System returns 0 for success and non zero for failure.  If you want to capture 
the output then try the ` (backticks)(left side of keyboard under ~) You may want to 
capture the output in an Array and look at what you find there.

Wags ;)
> 
> But before that it prints the string that the program or command
> returned..!!!
> How do I capture the return value or $res as I need to work with $res
> further.!!
> 
> $exit_value  = $? >> 8;
> This didn't help..
> 
> Thanks, :)



      Any questions and/or problems, please let me know.

      Thanks.

Wags ;)
Int: 9-8-002-2224
Ext: 408-323-4225x2224



**********************************************************
This message contains information that is confidential
and proprietary to FedEx Freight or its affiliates.
It is intended only for the recipient named and for
the express purpose(s) described therein.
Any other use is prohibited.
****************************************************************


--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
<http://learn.perl.org/> <http://learn.perl.org/first-response>


Reply via email to