in reply to Dereferencing hashrefs
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
|
|---|