my $a_ref = shift; # reference to input array A my @a = @$a_ref; # input array A #### my @a = @{+shift};