my @ary=qw/dog cat gnat/; my $first=(grep {/at$/} @ary)[0]; print $first; __END__ cat
CU
Robartes-
In reply to Re: returning scalar context from map or grep
by robartes
in thread returning scalar context from map or grep
by !unlike
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |