Challenge: Sometimes we want to know whether one or more items were found in any of several lists
Response: Two new methods which return Boolean(-ish) values
$found = $lcm->is_member_any('abel');
# $found will be: 1
$memb_hash_ref = $lcm->are_members_any(
[ qw| abel baker fargo hilton zebra | ] );
# $memb_hash_ref will be:
{
abel => 1,
baker => 1,
fargo => 1,
hilton => 1,
zebra => 0,
};
Previous | Back to start of show | Next |
Slide: 11 these_any | © 2004-18 James E. Keenan |