Zero equals pipe??
- From: ilya2@xxxxxxx
- Date: 23 Sep 2006 18:17:38 -0700
My perl program had some conditional statements that checked whether a
given characters was a pipe "|" or not. The program behaved strangely,
and I quickly realized it was treating pipes and zeros equivalently. To
make sure I was not going insane, I put the following checks:
if ( '1' == '|') { ... some statement ... }
if ( '0' == '|') { ... another statement ... }
By any sensible measure, both statements must return FALSE. First one
did that. Second one returned TRUE.
What's going on and how do I get around it?
.
- Follow-Ups:
- Re: Zero equals pipe??
- From: Jürgen Exner
- Re: Zero equals pipe??
- From: Sisyphus
- Re: Zero equals pipe??
- From: John Bokma
- Re: Zero equals pipe??
- From: kens
- Re: Zero equals pipe??
- Prev by Date: FAQ 8.48 How do I add the directory my program lives in to the module/library search path?
- Next by Date: Re: submatch scoping in while
- Previous by thread: FAQ 8.48 How do I add the directory my program lives in to the module/library search path?
- Next by thread: Re: Zero equals pipe??
- Index(es):
Relevant Pages
|