my $sth = $dbh->prepare($sql) or die "error preparing: '$sql': " . $dbh->errstr; $sth->execute() or die "error executing: '$sql': " . $dbh->errstr; my $ref = $sth->fetchrow_hashref() or die "error fetching: '$sql': " . $dbh->errstr; my %hash = %$ref; print "H: $_ => $hash{$_}\n" for keys %hash;
-Blake
In reply to Re: Dereferencing hashrefs
by blakem
in thread Dereferencing hashrefs
by schnarff
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |