caedes has asked for the wisdom of the Perl Monks concerning the following question:
When this block of code is called with a REQUEST_URI of "/" it does not execute listall();
However when this block is executed with the same REQUEST_URI, listall(); is executed.my ($username, $imagename) = $ENV{REQUEST_URI} =~ /\/(.*)\/(.*)/; if(not defined $username || $username eq ""){ listall(); }
Why is this? The only thing I can think of is that the order of precedence dictates that the "not" be after the ||.my ($username, $imagename) = $ENV{REQUEST_URI} =~ /\/(.*)\/(.*)/; if(not defined $username){ listall(); }
-caedes
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: When art thy variables defined?
by bronto (Priest) on Jun 22, 2002 at 10:00 UTC | |
|
Re: When art thy variables defined?
by jepri (Parson) on Jun 22, 2002 at 09:26 UTC | |
|
Re: When art thy variables defined?
by abstracts (Hermit) on Jun 22, 2002 at 10:32 UTC | |
|
Re: When art thy variables defined?
by Aristotle (Chancellor) on Jun 22, 2002 at 15:57 UTC | |
|
Re: When art thy variables defined?
by particle (Vicar) on Jun 22, 2002 at 10:44 UTC |