http://www.perlmonks.org?node_id=714241


in reply to Re^4: Can't use string ("0") as a HASH ref
in thread Can't use string ("0") as a HASH ref

If, after use warnings; and use strict; at the top of your script, you were to add use diagnostics;, you would get more verbose, and in this case possibly more enlightening, warning nessages.

For this particular problem, the greater verbosity may not have been greatly helpful because the source of the problem (generating a '0' instead of a reference and not checking it) is far removed both lexically and executionally from the point of failure.