From: Bob Ford Date: 2013-03-01T07:55:00+09:00 Subject: Re: telnet - how to loop through commands listed in a file I looked at my for loop and saw that I didn't even use the correct variable in the loop... I change it but received the same error. I tried the mentioned: File.open ("CMDs.txt").each { | line | telnet.cmd (line.gsub("\"","")) { ...} } But that failed with the following: C:/Ruby Scripts/TelnetCMDs.rb:56: syntax error, unexpected tLPAREN_ARG, expecting $end telnet.cmd (line.gsub("\"","")) { |c| print c } -- Posted via http://www.ruby-forum.com/.