Challenge: How would I get items unique to @Carmen
?
@Al = qw(abel abel baker camera delta edward fargo golfer);
@Bob = qw(baker camera delta delta edward fargo golfer hilton);
@Carmen = qw(fargo golfer hilton icon icon jerky kappa);
@Don = qw(fargo icon jerky);
@Ed = qw(fargo icon icon jerky);
Response: Pass @Carmen
's index position in constructor's @_
as argument to get_unique()
.
$lcm = List::Compare->new(\@Al, \@Bob, \@Carmen, \@Don, \@Ed);
# 0 1 2 3 4
@unique_Carmen = $lcm->get_unique(2);
Previous | Back to start of show | Next |
Slide: 8 trickier | © 2004-18 James E. Keenan |