in reply to Dereferencing hashrefs

I think you'll have to expand on "Neither of which seem to work" since the snippets you provided look just fine. Perhaps your DBI call is failing and you aren't checking it. This works fine for me:
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