in reply to Dereferencing hashrefs
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 ACACAATGAATCTTTGACTCGAACAATCGTTCGGTCGCTCCGACGC
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re:x2 Dereferencing hashrefs (why {} and not ())
by grinder (Bishop) on Feb 11, 2002 at 09:32 UTC | |
|
Re: Re: Dereferencing hashrefs
by Sweeper (Pilgrim) on Feb 11, 2002 at 22:28 UTC |