#! /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 setting.\n"; } if($roll =~ /[2]/){ print REPORT "$now_string: Invalid Login is being attempted, please 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 Diego?\n"; } if($roll =~ /[6]/){ print REPORT "$now_string: Wayne and Thomas are my friends!\n"; } sleep(30); }