Compiled, ran, and gave the expected output for me. Perl 5.6.0, i686-linux.use Data::Dumper; sub get_day_name { "hlaghlag"; } print Dumper { map { $_ => get_day_name($_) } <DATA> }; __END__ foo bar baz
Care to be more specific about "doesn't compile"?
In reply to Re: Printing a reference to the output of map
by clintp
in thread Printing a reference to the output of map
by sierrathedog04
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |