onegative has asked for the wisdom of the Perl Monks concerning the following question:
#! /usr/bin/perl # $myfile="whatever.log"; open(REPORT,">$myfile") || die "Couldn't open $myfile: $!\n"; while(1){ $roll = int(rand 6) + 1; $now_string = localtime; if($roll =~ /[1]/){ print REPORT "$now_string: Table XYZ has an invalid archive se +tting.\n"; } if($roll =~ /[2]/){ print REPORT "$now_string: Invalid Login is being attempted, p +lease investigate.\n"; } if($roll =~ /[3]/){ print REPORT "$now_string: Someone has just issued a incorrect + command.\n"; } if($roll =~ /[4]/){ print REPORT "$now_string: Why does this system not like me?\n +"; } if($roll =~ /[5]/){ print REPORT "$now_string: Where in the world is Carmen San Di +ego?\n"; } if($roll =~ /[6]/){ print REPORT "$now_string: Wayne and Thomas are my friends!\n" +; } sleep(30); }
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Filehandle Print
by ikegami (Patriarch) on Jan 26, 2005 at 17:31 UTC | |
|
Re: Filehandle Print
by runrig (Abbot) on Jan 26, 2005 at 17:31 UTC | |
by ikegami (Patriarch) on Jan 26, 2005 at 17:33 UTC | |
|
Re: Filehandle Print
by davido (Cardinal) on Jan 26, 2005 at 17:36 UTC | |
|
Re: Filehandle Print
by borisz (Canon) on Jan 26, 2005 at 17:43 UTC |