in reply to Re^2: using shift and $_ in loop
in thread using shift and $_ in loop
perldoc -f grep is your friend.@A = grep { is_name($_) } @a;
Update: I just noticed the uc() you used. In that case:
perldoc -f map is also your friend.@A = map { uc($_) } grep { is_name($_) } @a;
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^4: using shift and $_ in loop
by moritz (Cardinal) on Oct 21, 2009 at 16:13 UTC | |
by keszler (Priest) on Oct 21, 2009 at 17:57 UTC | |
by leocharre (Priest) on Oct 21, 2009 at 20:20 UTC |