Can you comment on the alternatives?
return grep { $_ eq $_[0] } @_[ 1 .. $#_ ]; # or return ~~grep { $_ eq $_[0] } @_[ 1 .. $#_ ]; # or my $searched = shift; return !!grep { $_ eq $earched } @_;
Should I use them? And if not, why?
Thanks
In reply to Re: Perl Idioms Explained - !!expr
by Anonymous Monk
in thread Perl Idioms Explained - !!expr
by broquaint
For: | Use: | ||
& | & | ||
< | < | ||
> | > | ||
[ | [ | ||
] | ] |