{} creates an empty reference to an anonymous hash. To initialiase a hash (not that it's needed), use (). Better still, use strictures (use strict; use warnings;) at the start of all your programs and declare all your variables before use with my %hash; etc.
You'll probably find the Perl data structures cookbook is worth reading
In reply to Re: initializing a hash leaves garbage
by FunkyMonk
in thread initializing a hash leaves garbage
by hsfrey
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |