Substitute this for your map
do{ my %h; @h{ 0 .. $#a } = @a; %h };Or better, omit the curlies around the map and pass the reference direct.
do{ my %h; @h{ 0 .. $#a } = @a; \%h };
In reply to Re: lazy map question
by BrowserUk
in thread lazy map question
by cLive ;-)
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |