local $/; # slurp it...
#local $^I; # = ".bak"; #NO BACKUP! YIKES! (gotta do 17,000
open (OUT, ">$ARGV"); #dangerous, but what the heck...
Dangerous because you choose not to backup the file. Disks are cheap - failure can be expensive.
Have you seen:
# Help ensure file locking integrity...
use 5.004;
use Fcntl qw(:DEFAULT :flock);
sysopen(BLACKHOLE, "$path", O_WRONLY | O_CREAT)
or die "can't create $path: $!";
flock(BLACKHOLE, LOCK_EX)
or die "can't lock $path: $!";
truncate(BLACKHOLE, 0)
or die "can't truncate $path: $!";Pretty sure Windows has flock now.
HTH/Bill
-- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] <http://learn.perl.org/> <http://learn.perl.org/first-response>
