in reply to Back to Remedial Perl for Me: map{} function
If I understand this correctly, it seems to me that the map version you are looking for is:if ($access) { foreach (@{$access}) { $set{$_->[0]} = $_->[1]; } }
I have notes somewhere for a program that would generate this sort of thing automatically, given an example of the input and an example of the output, but I never got it completely figured out.%set = map {($_->[0], $_->[1])} @$access;
|
|---|