Hi Ian,

Sorry for the late reply on this issue but how about one of these:

IPC::Run3
Win32::Job

which will allow you to capture both STDOUT and STDERR

The other option is to wrap your script in a batch file and pipe the
output to a file:

:: Batch file to call Perl script
perl perl_script.pl >> output_file.txt

HTH,

Chris

Friday, December 29, 2006, 10:44:48 AM, you wrote:

ibn> Dear Perl/Win32 Gurus,

ibn> I have a Perl script which is triggered every minute (to check for
ibn> something) to complete a complex task that some users would rather not
ibn> perform themselves.  Of course, they're having mysterious trouble that is
ibn> not easily reproducible, so I would like to create a more extensive log
ibn> and mail it to myself.

ibn> The Perl script appears as a basic command shell, fired off by the
ibn> Scheduled Tasks part of Windows.  Various technical commands come and go,
ibn> with little bits to tell them how close they are to being done.  I have to
ibn> call upon assorted executables in this process, third-party executables
ibn> for which I have no source code.  I suspect either my users or the
ibn> executables are causing the trouble, but I can't sit down there and watch
ibn> my users, nor are they writing down any messages.

ibn> Does a way exist to capture everything in that command shell window prior
ibn> to exit?

ibn> Right now, I'm just appending to a logging message, and adding things to
ibn> it like the output from each and every "$shelloutput = qx/$shellcommand
2>>&1/;" I fire off, but I suspect there's a smarter way that I have
ibn> completely missed.

ibn> Of course, I'd like to see STDERR as much as STDOUT.

ibn> Thanks for your time,

ibn> Ian

ibn> _______________________________________________
ibn> Perl-Win32-Web mailing list
ibn> Perl-Win32-Web@listserv.ActiveState.com
ibn> To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs



-- 
Best regards,
 Christopher                            mailto:[EMAIL PROTECTED]

_______________________________________________
Perl-Win32-Web mailing list
Perl-Win32-Web@listserv.ActiveState.com
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs

Reply via email to