-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

John W. Krahn wrote:
> 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

Ahhh...I see.  Thanks.

Mathew

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.2 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQFFE5svr7cEqtYW7kARAkWRAKCM5xWbf+Hc+bHOpI+w6liEIFVoSQCeOYdQ
+o1MGFd6XNa4lVtaYeLmMEk=
=c+6v
-----END PGP SIGNATURE-----

-- 
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