Re: log file-pls reply On 5/10/07, Maphin Philip  wrote:
>             I am having a .pl and .pm meant for a test script
> It gives result in console window only
>
> How can I redirect it to a file
> ie.
> 1.      Create a file
> 2.      Redirect console to that file
> Thanks

That depends heavily upon which shell you are using, but in general
you should be able to say

perl script.pl > logfile.txt

Note, If the script writes to stdout and to stderr you may need to say

perl script.pl > stdout.txt 2> stderr.txt

or

perl script.pl > logfile.txt 2>&1

-- 
To unsubscribe, e-mail: beginners-unsubscribe@perl.org
For additional commands, e-mail: beginners-help@perl.org
http://learn.perl.org/


