my $sql = "SELECT detail FROM cust_bill_pkg_detail ".
" WHERE billpkgnum = ". $self->billpkgnum.
- " AND ( format IS NULL OR format != 'C' ".
+ " AND ( format IS NULL OR format != 'C' ) ".
" ORDER BY detailnum";
my $sth = dbh->prepare($sql) or die dbh->errstr;
$sth->execute or die $sth->errstr;
#avoid the fetchall_arrayref and loop for less memory usage?
- map { $_->[0] eq 'C'
+ map { (defined($_->[0]) && $_->[0] eq 'C')
? &{$format_sub}( $_->[1] )
: &{$escape_function}( $_->[1] );
}