in reply to grep and $_

Basically you are right. $_ iterates over @skipper, which happens for each element of the @required list. Adding some print statements help show what is happening.
my @required = qw(preserver sunscreen water_bottle jacket); my @skipper = qw(blue_shirt hat jacket preserver sunscreen); for my $item (@required) { print "$item\n"; unless (grep $item eq $_, @skipper) { # not found in list? print "skipper is missing $item.\n"; } }
The variable $item has each value from the @required list. In scalar context grep will return the number of times that the expression was true. $_ is an aliases to the element in the @skipper list.