Beefy Boxes and Bandwidth Generously Provided by pair Networks
The stupid question is the question not asked
 
PerlMonks  

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

by kp2a (Sexton)
on Sep 28, 2008 at 22:47 UTC ( #714223=note: print w/ replies, xml ) Need Help??


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


Thanks tip "use Data::Dumper;"
you are correct: my problem was wrong parameters in the call to the subroutine!
the code although mangled in an attempt to find the error is correct!
wish the error messages were a little more enlighting!


Comment on Re^4: Can't use string ("0") as a HASH ref
Re^5: Can't use string ("0") as a HASH ref
by AnomalousMonk (Abbot) on Sep 29, 2008 at 01:54 UTC
    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.

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://714223]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others romping around the Monastery: (13)
As of 2014-09-30 12:43 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    How do you remember the number of days in each month?











    Results (368 votes), past polls