First, to clarify, the answer I posted for
gdig321
was not intended to represent the only Way to do it (see TMTOWTDI).
I'm just used to using the -> operator.
The two examples you gave are slightly different. First:
$evilhash->{1} = {}
makes $evilhash a reference to an anonymous hash. The
anonymous hash has one key, "1", with an empty hashref as
the value corresponding with this key.
$evilhash{1} = {}
makes %evilhash, a true hash, which has one key, "1", with
an empty hashref as the value corresponding with this key.
Your two examples are correctly written and will produce
the same result, I agree. Thanks for the clarification,
-Adam