well, if you're not too worried about file size, just read the whole file into an array, and pop() off as many lines as you need. Course, that won't be the most optimal solution on large files. i.e.
my @file = <FILE>;
for( my $i=0; $i<$MAXLINES; $i++ ) {
print pop @file;
}