From: Kaye Ng Date: 2010-12-18T19:12:57+09:00 Subject: Someone explain to me the logic behind ARGV[0] For example there's a code lines = File.readlines(ARGV[0]) Why do i need the [0]? I have another program, testingargv.rb with this code puts ARGV.join('-') (no [0] parameter) if i type in the command prompt, testingargv.rb test 123 the result is test-123 i don't understand the logic behind [0] in lines = File.readlines(ARGV[0]) thanks guys! -- Posted via http://www.ruby-forum.com/.