in reply to syntax error with map in list context
Another way to force Perl to take your code is to add a pair of (), which seems clean and simple to me:
use strict; my %data=map { ("Player number $_"), [ map { 1 + int rand(10) } 1 .. 5 ] } 1 .. 10; print "$_ @{$data{$_}}\n" for ( keys %data );
|
---|
In Section
Seekers of Perl Wisdom