http://www.perlmonks.org?node_id=1077925


in reply to Perl in Windows - STDOUT to file Behavior difference by run context

Can you clarify what you mean by "in the run box"? My only guess is that you're clicking on the Start and then clicking on Run. If that's correct, it's possible that your calls to your Perl script and piping to output to a file may be working. However, your examples are using relative path (i.e. using the current directory) instead of a full path. You might want to check the directory where your perl.exe file is located. You just might find the files that you created from your calls from the "run box".

This may not be a quick and easy thing to do, but you might want to consider redesigning your script(s) to take an optional input argument that specifies a file to log output to rather than relying on using '>' from the command prompt environment to pipe the output to a file.

  • Comment on Re: Perl in Windows - STDOUT to file Behavior difference by run context

Replies are listed 'Best First'.
Re^2: Perl in Windows - STDOUT to file Behavior difference by run context
by AngelOnTheSideline (Initiate) on Mar 12, 2014 at 14:50 UTC
    Thanks for your reply. After a couple of test runs, I did search the system for the file, but it wasn't anywhere to be found because the redirect wasn't working. Simply logging my output wasn't enough. I inherited a 5000+ line script that calls into a .pm which then calls into a .dll and I needed all output to be in a file for debug and evaluation. One of your peers had the proper cmd line I needed to get it done without extra code.