is there a more efficient way to eliminate all the undefs right there inside the map()
my @flat = map defined ? @$_ : (), @$aoa;
Or perhaps:
my @flat = map ref eq 'ARRAY' ? @$_ : (), @$aoa;
In reply to Re: Flatten sparse AoA
by jwkrahn
in thread Flatten sparse AoA
by FloydATC
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |