Perl: the Markov chain saw | |
PerlMonks |
Re: printing hash produce errorsby bart (Canon) |
on Jun 02, 2013 at 12:18 UTC ( [id://1036582]=note: print w/replies, xml ) | Need Help?? |
Your problem is that you're mixing up hashes (%hash) with hash references ({ key => value }) -- note the braces.
Replace the braces with parens and it should work: This produces a flat list, not a hashref, which is exactly what assignment to a hash wants. Alternatively you could use a hashref (= a scalar pointing to a hash) everywhere:
In Section
Seekers of Perl Wisdom
|
|