In a message dated 10/30/03 10:35:08 AM Eastern Standard Time, [EMAIL PROTECTED] writes:
> ] > > Why don't you post the actual code since this obviously isn't it... $old = "oldfile.txt"; $new = "newfile.txt"; open(OLD,"$old") or die "Can't Open File: $!"; flock OLD, 2; open(NEW,>$new) or die "Can't Open File: $!"; flock NEW, 2; while (<OLD>) { if ($_ =~ /NO_EMAIL/) { $count++; } else { print NEW $_; } } close(NEW) or die "Can't Close File: $!"; close(OLD) or die "Can't Close Old: $!"; rename($old,$new); Is there something inherently wrong with doing it this way?