in reply to Deleting first and last TWO(2) lines of a text file
#!/usr/bin/perl -w use Tie::File; use strict; my $fname = shift @ARGV; tie my @file,'Tie::File',$fname or die $!; pop @file; pop @file; shift @file; untie @file; exit(0); [download]