Beefy Boxes and Bandwidth Generously Provided by pair Networks
Pathologically Eclectic Rubbish Lister
 
PerlMonks  

Re: Probelms returning values from a db and putting into a hash

by buckaduck (Chaplain)
on Apr 04, 2002 at 20:41 UTC ( #156763=note: print w/replies, xml ) Need Help??


in reply to Problems returning values from a db and putting into a hash

You loop through the keys of %dados, implicitly placing each key in the variable $_. But instead of using these keys, you keep using $fil to display the results in your foreach loop. This is what you get when you use global variables.

A quick fix might be to change the loop to this, locally setting $fil to each successive key:

foreach my $fil (keys (%dados))

buckaduck

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others contemplating the Monastery: (4)
As of 2022-12-10 05:30 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found

    Notices?