in reply to seek in a text file
open my $fh, "data" or die "could not open data for reading: $!"; my @data = <$fh>; close $fh; open $fh, ">data" or die "could not open data for writing: $!"; for (0..4) { print $fh $data[$_]; } close $fh;
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: seek in a text file
by ikegami (Patriarch) on Oct 06, 2008 at 01:44 UTC |