I know this is super old at this point, but for anyone else who references such things in their searches, here's another (IMHO cleaner) way to write greps...
my $arr_ref = [ grep {/[[:alpha:]]/} keys(%h) ];You can also assign the result to a dereferenced variable:
my $arr_ref; @$arr_ref = grep {/[[:alpha:]]/} keys(%h);In reply to Re: need an array ref from grep
by orderamidchaos
in thread need an array ref from grep
by jeanluca
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |