Claus Witt

Ruby has a global ARGV array which contains all arguments. Contrary to e.g. C and PHP it does not, however, contain the script name. This means the hello world program is very concise, since we do not need to handle the no argument / 1st argument issue.

ARGV.each do |arg|
  puts "Hello #{arg}"
end

Recent posts