![]() |
|
We don't bite newbies here... much | |
PerlMonks |
Re^3: Parsing a Hashby davorg (Chancellor) |
on Jul 22, 2009 at 08:05 UTC ( [id://782209]=note: print w/replies, xml ) | Need Help?? |
Well, I explained in the other thread what the problem is. The example code treats $results as an array ref but the show_user method returns a hash ref. You should get the (to my mind, really very clear) warning "Not an ARRAY reference". Which leaves us wondering why you're not seeing this warning when you clearly have use warnings in your code. My suspicion is that you're looking in the wrong place. All of the CGI scaffolding in your code makes me think that you're running this as a CGI program. Depending on which web server you're using and how it is configured several things can happen to warnings from CGI programs. The most common effect is that they are written to the web server error log. Did you look in there? You can force warnings and errors to be written to the browser by adding the following line to your code:
But remember to remove it again before putting the program into production. It's also worth pointing out that just because your code is a CGI program, there's no reason why you shouldn't run it from your command line in order to try it out. I never put a CGI program onto a web server without running it from the command line first.
In Section
Seekers of Perl Wisdom
|
|