Beefy Boxes and Bandwidth Generously Provided by pair Networks
Syntactic Confectionery Delight
 
PerlMonks  

Re: error report

by romandas (Pilgrim)
on Mar 06, 2008 at 10:35 UTC ( [id://672425]=note: print w/replies, xml ) Need Help??


in reply to error report

Besides redirecting to STDERR within the program, you can also redirect it from the shell if you run it at the commandline.

In both Linux and Windows, you can do this:
c:\perl_program.pl 2> error.log

or

$./perl_program 2> error.log

This allows you to change the error file on the fly, or see it onscreen without changing the code. You can redirect STDOUT the same way, just leave off the 2 (or use 1; same thing).

Replies are listed 'Best First'.
Re^2: error report
by marc_ (Deacon) on Mar 06, 2008 at 20:03 UTC
    If in a *nix or Cygwin environment I will usually "| tee <filename>" which duplicates the output to both the console and the named file.

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others cooling their heels in the Monastery: (4)
As of 2024-04-25 13:15 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found