in reply to Implementing a text filter on some dataset

Works perfectly... Thanks a lot :) I want to use the same filter in a code that I've already written for another format. I have some lines in my code that print the fields:
print $db_title."\n"; print $db_source."\n"; print $db_length."\n"; print $db_author."\n"; print $db_body."\n"; print $db_language."\n"; print $db_subject."\n"; print $db_datepub."\n"; print $db_loaddate."\n"; print "\n\n\n";
Now, I have to print all the fields only if the filter condition matches but I am unable to get it right on how to use the filter with this data. Can I have some help here please?