Beefy Boxes and Bandwidth Generously Provided by pair Networks
Come for the quick hacks, stay for the epiphanies.
 
PerlMonks  

Re: printing to STDOUT and a Logfile

by rbc (Curate)
on Oct 29, 2002 at 00:39 UTC ( [id://208644]=note: print w/replies, xml ) Need Help??


in reply to printing to STDOUT and a Logfile

This is the way I do it. It my be too simple for all your logging needs.
perl -e 'print "Hello\n";' | tee logfile
... or If I also want to trap STDERR I do ...
perl -e 'print "Hello\n;' >& logfile
... but then again does logging need to be complicated?

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://208644]
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: (6)
As of 2024-03-29 13:49 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found