in reply to Constructing HoHoA from AoA

Well, here's what I came up with when I tried to solve it myself without looking at the other answers first. Not that innovative, but I will observe, for me at least, it seems to be easier to deal with hash refs and array refs than hash/arrays. Why this seems cleaner? I'm not sure if this is a syntactical thing or psychological thing, or a little of both, or just a quirk of mine, but at any rate:
my $param_hash; foreach my $nar (@nar) { my ( $cwd, $prm ) = split( " - ", $nar->[0] ); my $rest = [ @$nar[ 1 .. 2 ] ]; push @{ $param_hash->{$cwd}->{$prm} }, $rest; } print Dumper $param_hash;
I would also like to ask neversaint, did you clean up the D::D output, or did it really come out like that? I tried $Data::Dumper::Indent = 0, but everything just spewed out on one line. Indent = 1 or more, and it split over too many lines, like in holli's output above. So, if there's a way to do this, please share. Thanks!