did you try reading from the open handle FOO?
did you try specifying the *exact* location
of the 'date' program?

this works great on my system:

my $cmd = '/bin/date';
open(X, "$cmd |")               || die("blah");
print $line             while ($line = <X>);
close(X);


> -----Original Message-----
> From: [EMAIL PROTECTED]
> [mailto:[EMAIL PROTECTED]]On Behalf Of
> Chunbo Shao
> Sent: Wednesday, June 27, 2001 2:37 PM
> To: Perl Win32 Web; ActivePerl
> Subject: system call return back into my perl script
> 
> 
> I know the return of backstick can give me the thing I want. But now, I
> can only use system or exec to run some command like "date", and I do
> need to assign the screen output to my script variable.
> 
> The way of 
> open(FOO, "date |") || die;
> is also not work for my purpose.
> 
> Pls help me.
> 
> Thanks
> 
> 
> Major
> _______________________________________________
> Perl-Win32-Web mailing list
> [EMAIL PROTECTED]
> http://listserv.ActiveState.com/mailman/listinfo/perl-win32-web
> 
_______________________________________________
Perl-Win32-Web mailing list
[EMAIL PROTECTED]
http://listserv.ActiveState.com/mailman/listinfo/perl-win32-web

Reply via email to