Declare the hash before assignment.
my %hash; %hash = ... [download]
In reply to Re: hash reference to itself by Anonymous Monk in thread hash reference to itself by ExReg