running Perl script from Batch file

April 13, 2010 at 11:57:45
Specs: Windows Server 2003 SP 1
I am trying to run a perl script in a batch file then output the contents to a logfile. When I run from the cmd prompt the perl script will run but from the batch file it hangs until I manually hit 'Enter' (defeating the purpose of the batch file).

The batch file is as simple as:
perl -w>C:\Perl\Log\logfile.txt

The cmd prompt hangs at:
C:\perlscriptpath>perl -w 1>C:\Perl\Log\logfile.txt

I don't understand what is happening after the first part of the cmd that is throwing the 1 error.

Any ideas - I know I must be overlooking the most obvious detail.


See More: running Perl script from Batch file

Report •

April 13, 2010 at 13:25:09
it seems like the perl script must be asking for input at a prompt in the script.
i would test-run without the pipe to see if it's asking for something or throwing an error requiring ENTER:
C:\perlscriptpath>perl -w
then see what it's doing,
and/or examine the perl script to see if it is prompting.

Report •
Related Solutions

Ask Question