use Tie::File; tie @array, ’Tie::File’, "filename" or die "tie failed: $!"; # remove the first 100 lines: splice(@array, 0, 100); untie @array;