$lineno=100; #Opening file open(FILE, "$file") or die "Can't find $file \n"; #Transfer contents of file to array @lines = ; #Count number of lines in the file $num = @lines; for (; $lineno > 0; $lineno--) { #Get last lines from the file and print them @tail = @lines[$num - $lineno]; print(@tail); } close(FILE);