Re: system() output redirection

2002-10-18 Thread John W. Krahn
Joe Mecklin wrote: > > 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 str

RE: system() output redirection

2002-10-18 Thread NYIMI Jose (BMB)
> $system_results = system("usr/bin/ptal-pml hpjd:$ip get-$type > $value"); I'm not sure if my suggestion will work :) but let try to use a pipe like this: open(PIPE,"usr/bin/ptal-pml hpjd:$ip get-$type $value |") #note the | character at the end. || die "open pipe failed! : $!\n"; whi

RE: system() output redirection

2002-10-18 Thread Kipp, James
btw i noticed my answer had some syntax errors in it. i am sure you will find them :-) > -Original Message- > From: Joe Mecklin [mailto:jm5379@;sbc.com] > Sent: Thursday, October 17, 2002 12:31 PM > To: Kipp, James > Cc: [EMAIL PROTECTED] > Subject: RE: system()

RE: system() output redirection

2002-10-18 Thread Joe Mecklin
James, Thanks. That's exactly what I was looking for. I was trying to combine the backticks with system() instead of replacing system() with backticks. Someone also pointed out a missing "/" in my path, thanks for that as well. Joe On Thu, 2002-10-17 at 11:26, Kipp, James wrote: > system() d

RE: system() output redirection

2002-10-18 Thread Kipp, James
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