Beefy Boxes and Bandwidth Generously Provided by pair Networks
Think about Loose Coupling
 
PerlMonks  

Re: Creating log files for errors and warnings

by stevieb (Canon)
on Aug 27, 2010 at 07:21 UTC ( [id://857622]=note: print w/replies, xml ) Need Help??


in reply to Creating log files for errors and warnings

What have you tried?:

#!/usr/bin/perl use warnings; use strict; open my $fh, ">", 'logfile.txt' or die "Can't open the fscking file: $!"; my $need_work = 10; my $i_tried = 0; while ( $need_work > $i_tried ) { $i_tried++; my $statement = "I've tried $i_tried things as a test\n"; print $fh $statement; } __END__
% cat logfile.txt I've tried 1 things as a test I've tried 2 things as a test I've tried 3 things as a test I've tried 4 things as a test I've tried 5 things as a test I've tried 6 things as a test I've tried 7 things as a test I've tried 8 things as a test I've tried 9 things as a test I've tried 10 things as a test
Steve

Log In?
Username:
Password:

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

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

    No recent polls found