in reply to searching a list
Or you can look your self and break when you get a hit:my $ct = scalar grep { $_ eq 'at' } @s;
I would also suspect that List::Util has something useful..my $found; foreach ( @s ){ next unless $_ eq 'at'; $found = 1; last; }
my %h; $h{$_}++ for @s; warn "got " . ($h{at}||0) . " hits for 'at'";
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: searching a list
by ikegami (Patriarch) on Jun 27, 2006 at 04:18 UTC | |
by McDarren (Abbot) on Jun 27, 2006 at 04:49 UTC |