Mathew Snyder wrote:
> John W. Krahn wrote:
>>>Yes, Perl has five "false" values: undef, (), 0, '' and '0', and two of those
>>>are valid input from the readline operator.
> 
> Should running the above from the command line make a difference?  I ran
> them both entering 0 each time and I got 0 back.  This is what it looks
> like:
> 
> [EMAIL PROTECTED]:~> perl -e 'if ($_ = <STDIN>) { print; }'
> 0  <---input value
> 0  <---returned value

The problem there is that the input value is actually "0\n".  Try it like this:

echo -n 0 | perl -e 'if ($_ = <STDIN>) { print }'



John
-- 
use Perl;
program
fulfillment

-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
<http://learn.perl.org/> <http://learn.perl.org/first-response>


Reply via email to