If you know the size of the last line in bytes, you can seek to the end of the file and then seek back that number of bytes before reading. Or if you know the number of lines in the file, you can use $. to find the last one. If you don't know either the bytes or lines, you can use
. Or you can simply declare a variable then loop through the file setting the variable to each line and then at the end of the loop, presto, the variable only holds the last line.