Beefy Boxes and Bandwidth Generously Provided by pair Networks
Your skill will accomplish
what the force of many cannot
 
PerlMonks  

Re: Building a log file

by si_lence (Deacon)
on Jun 23, 2009 at 14:56 UTC ( #774048=note: print w/ replies, xml ) Need Help??


in reply to Building a log file

I'm not sure I understand your problem.

You can open your log-file at the start of your program and just write to it with the print statements:

my $logfile = 'path/to/logfile.txt'; open(LOG, "> $logfile") or die "could not open log-file: $!"; print LOG "this is a log entry\n";

If you need to see your log output immediately be aware of buffering issues ...

cheers

si_lence


Comment on Re: Building a log file
Download Code

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others studying the Monastery: (14)
As of 2015-05-04 15:51 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    In my home, the TV remote control is ...









    Results (93 votes), past polls