in reply to Dereferencing array of hashrefs
Putting that together gives:
You need the + to disambiguate the expression from print(). All in all, it's a little messy, and having the extra variable is a reasonable tradeoff for readability.print +(fetchrow_hashref($dbh, $query))[0]{key}, "\n";
Update: ysth is dead on, you do need the arrow!
blokhead
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Re: Dereferencing array of hashrefs
by ysth (Canon) on May 13, 2004 at 02:37 UTC | |
|
Re: Re: Dereferencing array of hashrefs
by Guildencrantz (Sexton) on May 13, 2004 at 02:13 UTC |