Matt Sergeant wrote:
> 
> On Thu, 5 Oct 2000, Dana C. Chandler III wrote:
> 
> > In my limited experience, it is Perl in general that treats the value 0,
> > in a query string as the empty string.  In all of the scripts I have
> > written, if 0 is possible as a param value, I have to explicity check
> > for 0.
> 
> This is only the case when you're going:
> 
> if ($r->param('name')) {
>         # do something
> }
> 
> if its a zero then you should expect to be bitten in the ass by that
> one. However I do assume that there's similar code going on somewhere to
> turn the zero into undef.
> 

Just to add, I was explicitly checking for 0 in the value returned but
was getting an empty string. 0 in this case was a single character
required. An empty string was not.

Once Matt informed me it was a bug/feature it set my mind at ease and I
was able to implement a work around.

-- 
John Reid
Senior Analyst/Programmer
Open Connect (Ireland) Ltd
http://www.openconnect.ie/

Reply via email to