Being a big dork/geek rather than exclaim Argh! I will often say argv! and people will look at me funny, and I will laugh and laugh because they are dumb-dumb-heads.

argv is the standard variable name used in C for the array of incoming command line arguments. It is often seen in the declaration of the main funciton.

main(int argc, char *argv) {
}

In C, argv is the conventional name for the second parameter to main(int argc, char *argv[]), which holds the argument vector (the first parameter is its size). The first element argv[0] is the name of the program, followed by the arguments passed in. So argv is roughly the list of arguments as it appears on the command line -- if there is such. Some misguided people, no doubt unwitting pawns of Redmond, claim argv stands for argument values. Such a claim is ridiculous.

Perl holds the argument vector in the array @ARGV. However, the program name is eliminated from there, and lives in $0; so $ARGV[0] really represents C's argv[1]...). Plain ARGV is the name of the filehandle which iterates over all files named in @ARGV; <> is really <ARGV>. $ARGV is the name of the file at which the ARGV filehandle is currently looking.

Log in or registerto write something here or to contact authors.