in reply to need an array ref from grep
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);
|
|---|