It would help to associate .pl with perl.exe, in such a way that redirection works, i.e. > myscript.pl > output.txt works the same as > perl myscript.pl > output.txt