I have a task to convert script from Perl to PowerShell.
I read about command line argument of Perl: @ARGV. I understand that at the time of the script execution, any argument that is passed will be captured by this special array variable. We can read @ARGV and assign values to scalar variables using:
($var1,$var2) = @ARGV;
I need to understand what the statement below is doing:
($var1,$var2,@ARGV) = @ARGV;
In my script, I have an if condition on values in @ARGV, and based on @ARGV values, a respective subroutine is getting called.
As per my understanding if we have more than two values in @ARGV, then on left side in parenthesis statement is changing values of ARGV/used to rewrite @ARGV with remaining Values?