in reply to How would I write this using map?
sub add2array { my $obj = new THING; push @{ $_[ 0 ] }, sort keys $obj->things; } [download]