Today's coding warm-up using Path::Class
use Path::Class qw{ file }; # # Getting file name is left to reader # my $input_file = file( $filename ); # # WARNING: Destructive operation! # my $output_file = $input_file; # Left to the reader to change my @file_contents = $input_file->slurp(); shift @file_contents; # Remove first line pop @file_contents; # Remove last line $output_file->spew( @file_contents );
In reply to Re: Deleting first and last lines of a text file
by admiral_grinder
in thread Deleting first and last TWO(2) lines of a text file
by vsmeruga
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |