From scottp at dd.com.au Sun Apr 7 22:33:29 2002 From: scottp at dd.com.au (Scott Penrose) Date: Wed Aug 4 00:02:33 2004 Subject: Short Module Talks Message-ID: <64D4D6E2-4AA1-11D6-AF9F-003065B58CF8@dd.com.au> -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Hey Dudes, Anyone want to volunteer some short talks (5-15 minutes) on any modules for this weeks meeting (yes it is this week, I think :-) Scott - --- Scott Penrose Open source and Linux Developer http://linux.dd.com.au/ scottp@dd.com.au -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.0.6 (Darwin) Comment: For info see http://www.gnupg.org iD8DBQE8sQ+KDCFCcmAm26YRAoR9AKCoeCzDc+VhXzg5h/NHI+lIGHR6VACgkR4i sOMInmPXrgVUINE3tvrLmIQ= =2Udt -----END PGP SIGNATURE----- From scottp at dd.com.au Mon Apr 8 19:33:16 2002 From: scottp at dd.com.au (Scott Penrose) Date: Wed Aug 4 00:02:33 2004 Subject: April Melbourne.pm Meeting - Wednesday 6:30pm - Door Prizes :-) Message-ID: <624E4DEA-4B51-11D6-AD38-003065B58CF8@dd.com.au> -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Hello and welcome to another Melbourne Perl Mongers Meeting Date: Wednesday 10th of April 2002 When: 6:30pm Where: myinternet Level 8, 14 Blackwood Street North Melbourne Agenda * Welcome and the last month In the last month we have had a number of changes, including the VTR users group conference, new web site, new logo, sponsorship from O'Reilly and more. * O'Reilly Books We have received a number of O'Reilly books for free for the group. I am suggesting we start up a library and loan these out a monthly basis. We shall talk about it at the meeting :-) * Door Prize Thanks to O'Reilly we have a number of give aways, including a Catalogue for everyone that comes, and a few door prizes :-) * Module Talks Still to be confirmed * Main Talk Template Toolkit - The ultimate Template System Come and learn how to write templates and how to use them. Why they are good and some interesting applications. Part 1 - Templates - Kathryn Grant Part 2 - Perl and Templates - Scott Penrose - --- Scott Penrose Open source and Linux Developer http://linux.dd.com.au/ scottp@dd.com.au -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.0.6 (Darwin) Comment: For info see http://www.gnupg.org iD8DBQE8sjbSDCFCcmAm26YRApLUAJ9yR3dXpkD0YQwTUE8RXlaTOWICvQCeI53f 3+c3S7woAF4O4F89welz81E= =9M2Q -----END PGP SIGNATURE----- From scottp at dd.com.au Fri Apr 12 00:05:35 2002 From: scottp at dd.com.au (Scott Penrose) Date: Wed Aug 4 00:02:33 2004 Subject: Fwd: Regular Expressions Message-ID: Hey guys No idea why but this message got bounced to me (owner currently of melbourne-pm) because it contained the word 'help' somewhere in the title Literally I received: Subject: BOUNCE melbourne-pm@pm.org: Admin request: /^subject:\s*help\b/i Anyway, it is of course a legitimate question so here it is... Scott > Reply-To: "Andrew Gray" > From: "Andrew Gray" > To: > Subject: Help with regular expressions > Date: Thu, 11 Apr 2002 10:07:29 +1000 > > Hi guys/gals, > > I have an anti spam filter that uses regular expressions to take out > mail > based on From: addresses > > an example is > .*[0-9]{5,10}\@aol.* > > which filters all spammer type addresses like fred123456789@aol.com, > but I > have a very few addresses that it is catching that I would like to let > through, so my question is, how can I write a rule with exceptions > > ie ban *123456789@aol.* except LauraK894820558@aol.com > > Andrew --- Scott Penrose Open source and Linux Developer http://linux.dd.com.au/ scottp@dd.com.au From daniel at landmarksoftware.com.au Fri Apr 12 02:38:38 2002 From: daniel at landmarksoftware.com.au (Daniel Walmsley) Date: Wed Aug 4 00:02:33 2004 Subject: Regular Expressions Message-ID: <10328A423AC2D311AE5B0008C70FE564106DAC@LANDNT> What about something like: my @exceptions; #list of addresses that are exceptions to the rule my $in_mail; #the mail you received my $in_address; #address of the mail you received unless ( { my $filter=0; #0 if no exception was found, 1 if the $in_address is an exception foreach (@exceptions) { if(/^$in_address$/) { #if the in address matches an exception $filter=1; } $filter; #return the value of $dont_filter } ) { if(/.*[0-9]{5,10}\@aol.*/) { throw_away_mail_from $in_mail; #call some function that throws away the e-mail } } There's probably a bug in there somewhere... and I should be breaking out of the foreach when I set $dont_filter, but I can't remember how (is there a break statement in Perl). But that's the idea, I would guess. Dan -----Original Message----- From: Scott Penrose [mailto:scottp@dd.com.au] Sent: Friday, 12 April 2002 3:06 PM To: melbourne-pm@pm.org Subject: Fwd: Regular Expressions Hey guys No idea why but this message got bounced to me (owner currently of melbourne-pm) because it contained the word 'help' somewhere in the title Literally I received: Subject: BOUNCE melbourne-pm@pm.org: Admin request: /^subject:\s*help\b/i Anyway, it is of course a legitimate question so here it is... Scott > Reply-To: "Andrew Gray" > From: "Andrew Gray" > To: > Subject: Help with regular expressions > Date: Thu, 11 Apr 2002 10:07:29 +1000 > > Hi guys/gals, > > I have an anti spam filter that uses regular expressions to take out > mail > based on From: addresses > > an example is > .*[0-9]{5,10}\@aol.* > > which filters all spammer type addresses like fred123456789@aol.com, > but I > have a very few addresses that it is catching that I would like to let > through, so my question is, how can I write a rule with exceptions > > ie ban *123456789@aol.* except LauraK894820558@aol.com > > Andrew --- Scott Penrose Open source and Linux Developer http://linux.dd.com.au/ scottp@dd.com.au From jarich at perltraining.com.au Fri Apr 12 03:00:52 2002 From: jarich at perltraining.com.au (Jacinta Richardson) Date: Wed Aug 4 00:02:33 2004 Subject: Regular Expressions In-Reply-To: <10328A423AC2D311AE5B0008C70FE564106DAC@LANDNT> Message-ID: > my @exceptions; #list of addresses that are exceptions to the rule > my $in_mail; #the mail you received > my $in_address; #address of the mail you received > > unless ( { > my $filter=0; #0 if no exception was found, 1 if the $in_address is > # an exception > foreach (@exceptions) { > if(/^$in_address$/) { #if the in address matches an > #exception > $filter=1; > } > $filter; #return the value of $dont_filter > } ) { > if(/.*[0-9]{5,10}\@aol.*/) { > throw_away_mail_from $in_mail; #call some function that > # throws away the e-mail > } > } The following improvements can be made. - eq is faster than /^something$/ - the foreach is doing a grep. (- the unless isn't doing anything) so: my @exceptions; my $in_mail; my $in_address; # return 1 if we like the address, return 0 otherwise. if(grep '$in_mail', @exceptions) { return 1; # it's an exception } elsif($in_mail =~ /.*[0-9]{5,10}\@aol.*/) { return 0; # we think it's spam } # do more tests. # ... # must be good. return 1; > the foreach when I set $dont_filter, but I can't remember how (is there a > break statement in Perl). But that's the idea, I would guess. The break statement in perl is "last" Jacinta From pjf at perltraining.com.au Sun Apr 28 20:50:32 2002 From: pjf at perltraining.com.au (Paul Fenwick) Date: Wed Aug 4 00:02:33 2004 Subject: Next meeting -- speakers? Message-ID: <20020429115032.C20854@mukc.org.au> G'day everyone, The next Melb.PM meeting is rapidly approaching (8th May), and we need a main speaker to talk about whatever they're interested in that happens to be somewhat Perl related. Be quick, this opportunity to be the main speaker at the next Melb.PM meeting won't last long. :) If you want to talk, speak up now. :) All the best, Paul -- Paul Fenwick | http://perltraining.com.au/ Director of Training | Ph: +61 3 9354 6001 Perl Training Australia | Fax: +61 3 9354 2681 -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: application/pgp-signature Size: 232 bytes Desc: not available Url : http://mail.pm.org/archives/melbourne-pm/attachments/20020429/cd3600e7/attachment.bin