Beefy Boxes and Bandwidth Generously Provided by pair Networks
Problems? Is your data what you think it is?
 
PerlMonks  

Re: Very basic question on reading error messages

by runrig (Abbot)
on Sep 07, 2001 at 21:17 UTC ( [id://110948]=note: print w/replies, xml ) Need Help??


in reply to Very basic question on reading error messages

Redirect errors to a file and read them at your leisure:
perl myprogram.pl 2>errors.txt # Or on WinNT you can do just like Unix: perl myprogram.pl 2>&1 | more

Replies are listed 'Best First'.
(tye)Re: Very basic question on reading error messages
by tye (Sage) on Sep 08, 2001 at 00:27 UTC

    The first one doesn't work under Win9x either (IIRC). If you are on Win9x, the command shell is so broken that there is no way to get it to send STDERR to a file. Luckilly, you have Perl which means you have lots of ways you could do it:

    perl -e "open(STDERR,'>>errors.log'); do 'script.pl'" perl -e "open(STDERR,'>>errors.log'); exec $^X,'script.pl'"
    to give just a couple that I didn't notice already in this thread. (:

            - tye (but my friends call me "Tye")
      program -args >& out.txt works just fine if you use the 4NT shell. Nobody in his right mind who actually uses the command line would try and cope with CMD.exe or worse yet COMMAND.COM.

      —John

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://110948]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others taking refuge in the Monastery: (4)
As of 2024-04-24 11:58 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found