@array = ; $last_line = $array[$#array]; #### seek(FILE, -81, 2); # 81 bytes from the end, which should be enough @lines = ; $last_line = $lines[$#lines]; # similar to above, but we don't read much #### tie *FILE, File::ReadBackwards 'input_file'; while () { # line-by-line starting from the end }