in reply to Re: Help with strict
in thread Help with strict

return scalar grep /^$who$/, @masters;

Why use a regular expression when you are looking for string equality? What would your code do if $who contained something like 'foo^bar', 'foo{2}', or 'foo[bar]' (all of which are legal IRC nicks?) I think the hash idea given by hardburn is better than a grep, but if you wanted to use grep you should probably do it something like this:

sub is_master { scalar grep $_[0] eq $_, @masters }
And if you wanted to be sure it behaved exactly like the original sub, always returning either a 0 or a 1:
sub is_master { scalar grep $_[0] eq $_, @masters and 1 }

-sauoq
"My two cents aren't worth a dime.";