求教:my $items=shift \@skipper;如何理解?【看错了】

求教:my $items=shift \@skipper;如何理解?【看错了】



QUOTE:
sub check_required_items {
  my $who   = shift;
  my $items = shift;

  my @required = qw(preserver sunscreen water_bottle jacket);
  for my $item (@required) {
    unless (grep $item eq $_, @{$items}) { # not found in list?
      print "$who is missing $item.\n";
    }
  }
}

my @skipper = qw(blue_shirt hat jacket preserver sunscreen);
check_required_items('The Skipper', \@skipper);

my $items = shift;此时,应该是shift \@skipper;shift一个数组引用,一个标量?如何理解呢?或许我理解错了?请您指导!谢谢。



---------------------昏,看错了,明白了,谢谢!

shift  后面省略的默认的参数@_

应该是 shift @_