while($info = $sth->fetchrow_hashref) { for (keys %$info) { print "$_ => $$info{$_}\n"; } }