Beefy Boxes and Bandwidth Generously Provided by pair Networks DiBona
No such thing as a small change
 
PerlMonks  

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

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

This is an archived low-energy page for bots and other anonmyous visitors. Please sign up if you are a human and want to interact.


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
Sections?
Information?
Find Nodes?
Leftovers?
    Notices?
    hippoepoptai's answer Re: how do I set a cookie and redirect was blessed by hippo!
    erzuuliAnonymous Monks are no longer allowed to use Super Search, due to an excessive use of this resource by robots.