in reply to If Simplification
And your pseudocode, in real code, might look like thismy $req_uri_re = join '|', map quotemeta, qw( /bulletin/ .css .ico formmail /prosp/ /calendar/ /edit/ /tmp/calendar2002-3/pgradh/regs/029.html/ ); if ($ENV{'HTTP_REFERER'} and $ENV{'REMOTE_ADDR'} ne "129.215.67.96" and $ENV{REQUEST_URI} !~ $req_uri_re) { }
See. perlop and perlre for more info.## false if $ENV{'REQUEST_URI'} contains "FalseIfJustThis" if($ENV{REQUEST_URI} !~ $regex) { } ## true if $ENV{'REQUEST_URI'} contains "FalseIfJustThis" ## AND contains "ButIfAlsoThisThenTrue") if($ENV{REQUEST_URI} =~ $regex and $ENV{REQUEST_URI} =~ $regex2) { }
_________
broquaint
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Re: If Simplification
by fourmi (Scribe) on Aug 07, 2003 at 11:10 UTC | |
|
Re^2: If Simplification
by Aristotle (Chancellor) on Aug 07, 2003 at 15:45 UTC |