Skip to main content.
home | support | download

Back to List Archive

Re: [swish-e] Swish-e prefs to ignore certain sentences

From: Peter Karman <peter(at)>
Date: Tue Apr 22 2008 - 02:07:10 GMT
Please reply to the list so that others can benefit. wrote on 4/18/08 6:58 PM:
> Peter & Bill,
> Thanks for the info on callbacks.  I've looked at the docs (at least the
> ones I've been able to find on and can't glean how to do it.
> Is there a sample of code showing how to block entire sentences with a
> callback? If not, would someone be willing to make a sample?  A PayPal
> 'thank you' would certainly be in order.
> I am eager to learn... just need some more data or a really obvious
> cheat-sheet.

my $sentence =<<EOF;
This is a block of text that
i would like skipped when

my %serverA = (

     filter_content => sub {
         my $content_ref = $_[3];

         $$content_ref =~ s/$sentence//sg;

         return 1;


Likewise, if you had an array of sentences to skip, you could put the s/// in a 
foreach loop.

Peter Karman  .  .  peter(at)
Users mailing list
Received on Mon Apr 21 22:07:25 2008