in reply to Iterating hash of blessed hashes

My solution feels a bit clunky...

At first I was going to suggest Data::DPath (meh) or (better) Class::XPath for slickness, but seeing how you're using DBM, just use DBI/DBD::DBM, something like

my $dbh = DBI->connect('dbi:DBM:', ... my $sql = " SELECT Rating, BannerPath FROM table WHERE Season = ? AND Rating > ? "; my $sth = $dbh->prepare($sql); $sth->execute( 'Season', 6.0 );; $sth->dump_results if $sth->{NUM_OF_FIELDS}; $dbh->disconnect;

See also DBI, Tutorials: Database Programming, http://w3schools.com/sql/

Also , data goes in <c></c> tags

Replies are listed 'Best First'.
Re^2: Iterating hash of blessed hashes
by ron7 (Beadle) on Feb 17, 2011 at 06:18 UTC
    Hadn't thought of that, but I'm actually using DBM::Deep so the SQL trick would probably not work.
      so the SQL trick would probably not work.

      Why? Even if DBD::DBM doesn't support DBM::Deep , DBM::Deep still has DBI storage -- slick :)