in reply to returning scalar context from map or grep
my @ary=qw/dog cat gnat/; my $first=(grep {/at$/} @ary)[0]; print $first; __END__ cat
CU
Robartes-
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Re: returning scalar context from map or grep
by !unlike (Beadle) on Apr 28, 2003 at 13:14 UTC |