open (INLOG,@ARGV[0]) or die "can't open DICT\n"; if (-e @ARGV[1]) { print "@ARGV[1] already exists. Overwrite? (y/n) "; chomp($test=); if ($test eq "y"){ open (OUT,">@ARGV[1]"); } else {die "chose something other than y";} } open (OUT,">@ARGV[1]"); print OUT "This log generated by log3.pl, which strips out every line that doesn't contain /war|say|tell|exclaim|ask|clantalk/\n\n\n"; @lineparts; while ($line = ) { if ($line=~/war|say|tell|exclaim|ask|clantalk/) { if ($line=~ /^\/,$line; $line=@lineparts[1]; } print OUT $line; print OUT "\n"; } } print "done\n";