Could any one please explain me what is $ARGV[0].
I found that in the Unity Build Player.
http://unity3d.com/support/documentation/Manual/Build%20Player%20Pipeline.html
$ARGV is an array of arguments passed on to the script from the command line, numbers in squares indicate the index of that array element just like in C#.
Thanks for the response f(solar)
There is another thing that I confused with the code below.
Is my perception correct that the code below is assigning a value into each Index?
For example the first line of the code tells "Set the first index of $ARGV to $target value and so on.
my $target = $ARGV[1];
my $optimization = $ARGV[2];
my $companyName = $ARGV[3];
my $productName = $ARGV[4];
my $width = $ARGV[5];
Thanks man
No no, it’s reading these values from the array and assigning them to variables with better names - much more simple to remember $target than $ARGV[1]. It’s just a word order error in the explanation.
In all the programming languages I’m familiar with the rule of thumb is that variable that the value is being assigned to goes to the left side, so that’s always a safe bet when encountering a new language. : )
Woahhh thank you for lighting that up. I really appreciate your help man
I have another confusion :shock:
:lol:
my $installPath = $ARGV[0];
my $target = $ARGV[1];
What is the value inside $ARGV[0] and $ARGV[1]? If we do the code above, then $installPath would be empty or null right? Please give me another englightenment.
Thanks F(Solar)
BTW in Perl Script $ARGV[0] is not an array.
In Perl Script, they use array something like this
my @colors = ("cyan", "magenta", "yellow", "black");
$ARGV[0] , $ARGV[1] , etc must be something else.
I hope this is something new for you because I just knew this. =D
Anyway I still don’t know what the hell is $ARGV[1] and so on