in reply to Subroutines: @_ and shift

my @a = 1..10; { my $s = shift @a; print "$s\n" #result: 1 which is the 1st @a array element } { my $s = @a; print "$s\n" #result: 9 which is the number of @a array elements }
The same is valid for shift and @_.
You may want to take a look at perldoc -f shift.