Both the approaches you cited (%$hashref and %{$hashref} are correct. (The {}s work like parenthesies. I've often wondered why {}s are used in this context, not ()s. Anybody?)
What errors are you getting? Are you sure DBI::fetchrow_hashref() is returning a hashref? Clearly, it /should/, but probably returns undef on errors. Try printing out the returned value; if it is a hashref, it'll say HASH(0xyadda). (If it's a blessed hashref, it'll be Some::Class=HASH(0xyadda.)
TACCTGTTTGAGTGTAACAATCATTCGCTCGGTGTATCCATCTTTG ACACAATGAATCTTTGACTCGAACAATCGTTCGGTCGCTCCGACGCIn reply to Re: Dereferencing hashrefs
by theorbtwo
in thread Dereferencing hashrefs
by schnarff
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |