in reply to Difference in Hash Declaration

The difference is that Example 2 (using parentheses) is correct and the others are broken.

Braces (i.e. { and }) are used (amongst other things) to create hash references. So...

my %hash = ( foo => 1, bar => 2 ); my $hashref = { foo => 1, bar => 2 };
perl -E'sub Monkey::do{say$_,for@_,do{($monkey=[caller(0)]->[3])=~s{::}{ }and$monkey}}"Monkey say"->Monkey::do'