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

Could your problem be the %dados = assignment? That will overwrite your hash each time.

I _think_ what you want is

$dados{$fil} = {$gel => {"$dte" => { cliente => "$rs", negocio => "$neg", + status => "$st", + valor => "$vp", nome => "$gen" + } + } };
But I'm hampered a bit because I don't understand the variable names.

AHA! GOT IT! It's your foreach. You're not using $_, you're using $fil, but the foreach is setting $_
--
Mike