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
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
> $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
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()
in [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 prob
ober 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