Just in case it's not clear enough for him (Kaye ng)...

In C argv[0] is the name of file being executed and argv[1] is the
actual "first" argument.
In Ruby ARGV[0] is like argv[1] in C, the actual first argument.

Play around a bit with a script like this.

p ARGV
ARGV.each_with_index do |x,y|
  puts "#{y} - #{x}"
end

Abinoam Jr.

On Tue, Dec 21, 2010 at 7:45 PM, Alec Ross <alec / arlross.demon.co.uk> wrote=
:
> This naming and usage stems back to the C programming language. There, ar=
gv
> is the conventional name for any command line arguments to the program, a=
nd
> it denotes an array of c-style strings. =A0Elements of an array in C are
> accessed by a (0-based) index. =A0Hence argv[0] gets the first argument v=
alue,
> argv[1] the second, and so on.
>
> HTH,
>
> Alec
> --
> Alec Ross
IyEvdXNyL2Jpbi9lbnYgcnVieQoKaWYgQVJHVi5sZW5ndGggPT0gMAogIHB1dHMgIlVzYWdlOiBh
cmd2IDxhcmd1bWVudHM+IiAKICBleGl0CmVuZCAgCgpwIEFSR1YKQVJHVi5lYWNoX3dpdGhfaW5k
ZXggZG8gfHgseXwgCiAgcHV0cyAiI3t5fSAtICN7eH0iCmVuZAogCgo=