in reply to Flatten sparse AoA
is there a more efficient way to eliminate all the undefs right there inside the map()
my @flat = map defined ? @$_ : (), @$aoa; [download]
Or perhaps:
my @flat = map ref eq 'ARRAY' ? @$_ : (), @$aoa; [download]