4 messages in net.sourceforge.lists.courier-maildropRe: [maildropl] pattern matching for ...
FromSent OnAttachments
Eric d'AlibutJul 15, 2009 7:21 pm 
Eric d'AlibutJul 15, 2009 8:43 pm 
Sam VarshavchikJul 16, 2009 4:01 am 
Eric d'AlibutJul 16, 2009 10:43 am 
Actions with this message:
Paste this link in email or IM:
Paste this link in email or IM:
Atom feed for this thread
Paste this URL into your reader:
Subject:Re: [maildropl] pattern matching for IP addressActions...
From:Sam Varshavchik (mrs@courier-mta.com)
Date:Jul 16, 2009 4:01:09 am
List:net.sourceforge.lists.courier-maildrop

Eric d'Alibut writes:

# get Received into a var foreach(/^Received:.*/) $MATCH =~ /[0-9]*\.[0-9]*\.[0-9]*\.[0-9]*/ SENDINGIP = $MATCH

I don't understand how to test the results of the '=~' for success or failure. '$MATCH' is a string, so how do I look for either a 1 or a 0?

if ($MATCH =~ /[0-9]*\.[0-9]*\.[0-9]*\.[0-9]*/)

=~ is an operator, the result of which is either 1 or 0.

------------------------------------------------------------------------------ Enter the BlackBerry Developer Challenge This is your chance to win up to $100,000 in prizes! For a limited time, vendors submitting new applications to BlackBerry App World(TM) will have the opportunity to enter the BlackBerry Developer Challenge. See full prize details at: http://p.sf.net/sfu/Challenge