system() does not return output, it returns status/error codes
perdloc -f system
use backticks instead
$cmd = "usr/bin/ptal-pml hpjd:$ip get-$type $value");
$system_results = `$cmd`


> -----Original Message-----
> From: Joe Mecklin [mailto:jm5379@;sbc.com]
> Sent: Thursday, October 17, 2002 12:06 PM
> To: [EMAIL PROTECTED]
> Subject: system() output redirection
> 
> 
> i'm trying to use system() to run ptal-pml to retrieve pml values from
> hp printers; my problem is how to redirect the system() output.  the
> variations i've tried with backticks or qx// are not accomplishing
> anything useful - i get either a numeric value or an empty 
> string.  this
> is the command i'm running:
> 
> $system_results = system("usr/bin/ptal-pml hpjd:$ip get-$type 
> $value");
> 
> can someone detail the proper syntax i need in order for 
> $system_results
> to receive the correct output?  or better still, the syntax 
> to redirect
> to a file (i do have a filehandle open and closed appropriately).
> 
> thanks,
> joe
> 
> 
> -- 
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 
> 


-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to