in reply to Flatten sparse AoA
This assumes each element of @AoA is either an arrayref, or an undefined value.@flat = grep {defined} map {@$_} grep {$_} @AoA;
I'm not the biggest fan of using EXPR ? LIST : () inside a map just to avoid writing grep.
|
|---|