Welcome to the Monastery | |
PerlMonks |
Re: The CORRECT thinking behind the {}s and the ()s.by samurai (Monk) |
on Sep 16, 2002 at 16:22 UTC ( [id://198287]=note: print w/replies, xml ) | Need Help?? |
Curly braces denote anonymous hashes. So %bad_hash only gets one element, whose key is a hash_ref.
The regular parenthesis denote an array, which is how you define a hash. $ary[0] is the first key, $ary[1] is the first values, $ary2 is the second key and so on and so forth. => is just a pretty alias to the comma operator.
--
In Section
Seekers of Perl Wisdom
|
|