use strict; my @a=qw/abc def ghi/; sub qwe(*@) { my $w=shift; shift @$w; } qwe(\@a); print @a;
The previous code is correct to delete one element of array. But you can always do some "misprints". And get just a "fake" procedure call.
use strict; my @a=qw/abc def ghi/; sub q(*@) { my $w=shift; shift @$w; } q(\@a); print @a;
In the previous code nothing is done to @a.