[Mimedefang] Re: Quick Mods question

Ben Kamen bkamen at benjammin.net
Fri Dec 26 17:10:22 EST 2003



Oh yea.. AND not && (grin)

I want to check user first since I get bounces with my email address
sometimes and I want to get those.. but yea.. Cool. :)

thanks,

 -Ben


On Fri, 26 Dec 2003, Jeremy Mates wrote:

> * Ben Kamen <bkamen at benjammin.net>
> > in 'filter begin' - is it valid for me to place the following...
> > ---------------------------------------------------------------------------
> > if (@Recipents eq 'someuser at mydomain.com' & $Subject eq 'message delivery failure') {
>
> Until Perl6[1], eq will not work on an array, and & is bitwise, not the &&
> logcial. I would use 'and' instead of &&, and check the subject before
> iterating through the recipients.
>
> if ($Subject eq 'message delivery failure' and
>   grep { $_ eq 'someuser at mydomain.com' } @Recipents) {
>
> The rest of the code looks fine.
>
>
> [1] or use Quantum::Superpositions in the meantime:
>
> use Quantum::Superpositions;
>
> if ($Subject eq 'message delivery failure' and
>   any(@Recipients) eq 'someuser at mydomain.com') {
> _______________________________________________
> Visit http://www.mimedefang.org and http://www.canit.ca
> MIMEDefang mailing list
> MIMEDefang at lists.roaringpenguin.com
> http://lists.roaringpenguin.com/mailman/listinfo/mimedefang
>

-- 
Ben Kamen - O.D.T., S.P.
----------------------------------------------------------------------
Home: ben at benjammin.net                       http://www.benjammin.net
Work: bkamen at uiuc.edu
gPG Pub Key - http://www.benjammin.net/www/pages/library

***************************************************************************
* NOTE: Opinions and Views discussed via email are my own and not that    *
* of the State of Illinois, University of Illinois or the Illinois Dept   *
* of Natural Resources.                                                   *
***************************************************************************

'/usr/games/fortune' says:
The human mind treats a new idea the way the body treats a strange
protein -- it rejects it.
		-- P. Medawar



More information about the MIMEDefang mailing list