I would like to generate random hash, i.e. where key is random number and value is also random number
my @x = map { rand => rand } (0 .. 5) Compile error: syntax error at (eval 310) line 5, near "} (" BEGIN not safe after errors--compilation aborted at (eval 310) line 5.
Mean while, the following works:
my @x = map { rand() => rand } (0 .. 5);
In reply to what's wrong with that syntax construction? by basiliscos
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |