I would also suspect that List::Util has something useful
yeah, first.
use List::Util qw( first ); my $found = defined first { $_ eq 'at' } @s;
By the way,
my $ct = scalar ...
is the same as
my $ct = ...
In reply to Re^2: searching a list
by ikegami
in thread searching a list
by keiusui
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |