Your code works for me when given an argument and a valid text
file. That means the problem is either your argument or your text file.

-- 
Posted via http://www.ruby-forum.com/.