In article <[EMAIL PROTECTED]>, John W. Krahn wrote: [orig. question clipped]
> > The simplest way I could think of doing that would be: > > use warnings; > use strict; > use Tie::File; > use Fcntl ':flock'; > > my $source_file = 'searchandreplace.txt'; > > my $t = tie my @data, 'Tie::File', $source_file or die "Cannot open > $source_file: $!"; $t->flock( LOCK_EX ); > > s/\s+\w+// for @data; > > untie @data; > > __END__ When I tried this I got an "untie attempted while one inner reference..." warning. Adding "undef $t" before the untie cured it. Seems to be a useful module. -- Kevin Pfeiffer International University Bremen A: Because it messes up the order in which people normally read text. Q: Why is top-posting such a bad thing? -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]