[Chicago-talk] removing line from file.
wiggins at danconia.org
Wed Mar 9 11:27:55 PST 2005
Richard Reina wrote:
> This may be annoyingly simple for most on this list,
> but does someone have time to take a minute to tell me
> what the easiest way in perl 5 to remove the first
> four lines from a text file?
> Thanks for any help.
If you aren't on the command line, one solution,
use Fcntl "O_RDWR";
tie my @file, 'Tie::File', 'test.txt', mode => O_RDWR or die "Can't tie
splice @file, 0, 4;
More information about the Chicago-talk