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 } [download]