>>>>> "D" == Dylan Northrup <docx / io.com> writes: D> opts.each do |opt, arg| D> # puts "Option: #{opt}, arg #{arg.inspect}" D> case opt D> when "-t" then title = #{arg.inspect} ^^^^^^^^^^^^^^ This is valid only in a string, otherwise this is just a comment D> when "-n" then nation = #{arg.inspect} D> when "-s" then submitter = #{arg.inspect} D> else puts "You shouldn't be here with #{opt} and #{arg.inspect} ^^^^^^^^ missing " at the end of the line D> end D> end require 'getoptlong' opts = GetoptLong.new( ['-t', GetoptLong::REQUIRED_ARGUMENT ], ['-n', GetoptLong::REQUIRED_ARGUMENT ], ['-s', GetoptLong::REQUIRED_ARGUMENT ] ) opts.each do |opt, arg| # puts "Option: #{opt}, arg #{arg.inspect}" case opt when "-t" then title = arg.inspect when "-n" then nation = arg.inspect when "-s" then submitter = arg.inspect else puts "You shouldn't be here with #{opt} and #{arg.inspect}" end end Guy Decoux