Then you have a broken Perl.
$ perl -e'use warnings; my %keys={A=>"b"};' Reference found where even-sized list expected at -e line 1. $ perl -v This is perl, v5.10.0 built for i686-linux Copyr...
I still am fuzzy about the difference between “square brackets,” “braces,” and “parentheses.”
Square brackets create an array and return a reference to the array.
Curly brackets create a hash and return a reference to the hash.
Parens are like in Math. They change the order of operations.
From that, it follows that one never uses [] or {} when initialising an array or hash*, and that parenthesis aren't related to array or hash initialisation.
* — They might be used in initialising the value of an array or hash element's value, though.
Update: I added the last paragraph and the associated "*". I thought it was obvious, especially in the context of the other replies, but it might need saying.
In reply to Re^2: Why? (each...)
by ikegami
in thread Why? (each...)
by locked_user sundialsvc4
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |