if you don't want/need the functionality/control that Win32::Process
provides, you can execute commands like;
this works on NTv4.0 server. haven't tried 2k.
@dirc = `dir c:\\`; # ` are backticks
print @dirc;
> -----Original Message-----
> From: Jason [SMTP:[EMAIL PROTECTED]]
> Sent: 16/11/2000 3:18
> To:
> Subject: Win32::Process - Reading From STDOUT
>
> hi,
>
> i'm working on a script that executes command line statements on windows
> servers. i have it working successfully, however i'm not able to get the
> output of the command on NT and 2000 servers. it seems to work somewhat
> on
> win98.
>
> the command i'm using is:
>
> Win32::Process::Create($ProcessObj,
> $ENV{'COMSPEC'},
> "command" . " /c " . $command,
> 0,
> NORMAL_PRIORITY_CLASS,
> ".")|| die ErrorReport();
>
> for example, if $command = "dir c:\" then i would expect to get the
> directory listing as the output. on win98, the output is sent to STDOUT
> and
> so it is displayed. on NT and 2000, though, the command is executed but i
> see no output. i've confirmed that it is working by executing a command
> such as "dir c:\ > c:\test.txt" i can see that the text file was created
> with the appropriate output.
>
> any ideas on how to get the output to STOUT and STERR can be accessed?
> any
> help would be appreciated.
>
> much thanks,
> jason
>
> _______________________________________________
> 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