Write a program which finds the next-to-last word in a string.
Your program should accept as its first argument a path to a filename. Input example is the following
some line with text another line
Each line has more than one word.
Print the next-to-last word in the following way.
#!/usr/bin/env ruby -w ARGF.each_line do |line| puts line.chomp.split[-2] end