You have two different variables, $hashrow and %hashrow. %hashrow is a hash, $hashrow is a reference to a hash.
The line print "$hashrow{phone}" attempts to print the value of %hashrow that corresponds to the 'phone' key (which has not been initialized). To dereference the hash, you need to use $hashrow->{phone}
perldoc perlref would be helpful, I'm sure.
In reply to Re: DBI and fetchrow_hashref
by jsprat
in thread DBI and fetchrow_hashref
by jeff867
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |