[ ... ] returns a reference to an anonymous array.
{ ... } returns a reference to an anonymous hash. In the appropriate syntactic context like assignment, that is. Curlies are used for various things, for example a block, or to group/disambiguate when dereferencing, like @{ $obj->method_that_returns_an_arrayref() }.
In reply to Re^3: Odd number of elements in anon hash
by almut
in thread Odd number of elements in anon hash
by roibrodo
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |