🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: news.software.nntp
Article #80321

Re: Can Cleanfeed filter on a specific user?

#80321
From: Jeffrey M. Vinocur
Date: Tue, 10 Mar 2009 02:03
30 lines
1704 bytes
In article <gp3fbd$k29$1@optima7.xanadu-bbs.net>,
John F. Morse <dont.bother> wrote:
>Ray Banana wrote:
>>
>>     if ( $hdr{'From'} =~ /$your_regex_goes_here/ ) {
>
>                    if ( $hdr{'From'} =~ /$from_name_here/ ) {

I think both of you know this, but...that dollar sign doesn't
belong there, unless you've got a variable defined somewhere
else.

Good:

        if ( $hdr{'From'} =~ /aol\.com/ ) {

Perhaps better:

        my $badpeople = 'aol\.com';
        if ( $hdr{'From'} =~ /$badpeople/o ) {

Very broken:

        if ( $hdr{'From'} =~ /$aol\.com/ ) {



-- 
Jeffrey M. Vinocur
jeff@litech.org
Technical Details
Message-ID: <gp4hp7$u1j$1@puck.litech.org>
Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!illumos!news.pugleaf.net!.TX!archive.pugleaf.net!archive.newsdeef.eu!mbox2nntp-news.software.nntp.20141118.mbox.gz!border2.nntp.ams.giganews.com!nntp.giganews.com!feeder.erje.net!news2.arglkargh.de!news.litech.org!not-for-mail
References: <gou9pu$a8c$1@optima7.xanadu-bbs.net> <80ocwdgpxd.fsf@banana.shacknet.nu> <gp3fbd$k29$1@optima7.xanadu-bbs.net>

Show Full Headers
Complete Article Headers
Message-ID: <gp4hp7$u1j$1@puck.litech.org>
Subject: Re: Can Cleanfeed filter on a specific user?
Date: Tue, 10 Mar 2009 02:03:19 +0000
From: jeff@litech.org (Jeffrey M. Vinocur)
References: <gou9pu$a8c$1@optima7.xanadu-bbs.net> <80ocwdgpxd.fsf@banana.shacknet.nu> <gp3fbd$k29$1@optima7.xanadu-bbs.net>
Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!illumos!news.pugleaf.net!.TX!archive.pugleaf.net!archive.newsdeef.eu!mbox2nntp-news.software.nntp.20141118.mbox.gz!border2.nntp.ams.giganews.com!nntp.giganews.com!feeder.erje.net!news2.arglkargh.de!news.litech.org!not-for-mail
Newsgroups: news.software.nntp
Organization: Litech Systems Design
Lines: 30
Sender: jeff@litech.org
NNTP-Posting-Host: puck.litech.org
X-Trace: puck.litech.org 1236650599 30771 66.218.0.75 (10 Mar 2009 02:03:19
 GMT)
X-Complaints-To: usenet@litech.org
NNTP-Posting-Date: Tue, 10 Mar 2009 02:03:19 +0000 (UTC)
X-Newsreader: trn 4.0-test76 (Apr 2, 2001)
Originator: jeff@litech.org (Jeffrey M. Vinocur)