my $bb_curve_sth = $db->GetCurveByIdentifier($bb_code); if ($db->err) { die "ERROR: ".$db->errstr."\n"; } my $bb_curve = $bb_curve_sth->fetchrow_hashref; $bb_curve_sth->finish; $db->CloseCursor($bb_curve_sth); ## Close the cursor