Monday, March 23, 2009

Special Variables - @ARGV

@ARGV

Short Name : @ARGV
Scope        :          always global

This variable is an array of the arguments passed to the script. he first element of this array is the first argument (not the program name). As the arguments are processed, the value of this variable can alter.

Example:

$TestString = "There were $#ARGV arguments first arguments @ARGV[0]\n";

print $TestString;

No comments: