in reply to Perl Idioms Explained - !!expr
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
|
---|
Replies are listed 'Best First'. | |
---|---|
Re^2: Perl Idioms Explained - !!expr
by broquaint (Abbot) on Jul 14, 2004 at 13:17 UTC | |
Re^2: Perl Idioms Explained - !!expr
by japhy (Canon) on Jul 14, 2004 at 14:46 UTC | |
Re^2: Perl Idioms Explained - !!expr
by davidrw (Prior) on Nov 05, 2005 at 02:55 UTC |
In Section
Tutorials