in reply to Re^2: Deleting first and last lines of a text file
in thread Deleting first and last TWO(2) lines of a text file
Have a read about quoting to see why the variable isn't interpolated. Also, never say "it didn't work" as a bug report - that's pretty much content-free.
In Section
Seekers of Perl Wisdom