Look at the functions for array manipulation: shift, pop, unshift and push - and splice.
You might want to iterate over the file while reading, instead of loading it into memory as a whole. Then the next keyword could be of interest to you:
my $first; while (<FILE>) { s/\s+$//; # strip newline and whitespace from end of line if( ! $first++) { print "The first line is '$_'\n"; next; }; print "Some other line is '$_'\n"; };
In reply to Re: Read and skip a line
by Corion
in thread Read and skip a line
by DaveMonk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |