Good point is made. Just wanted to summarize it. Every time when you see "Can't use something as reference to something" error, search for the existing element of the hash or array which is not reference as you expect it to be.
Non-existing elements are automatically created by perl for you, and probably this is what is confusing you.
In reply to Re^3: can't use string as hash ref
by andal
in thread can't use string as hash ref
by spickles
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |