On Mon, Mar 29, 2010 at 10:27 PM, Shlomi Fish <shlo...@iglu.org.il> wrote:

>>
>> No. ($foo == 1) is a list which always has a value of either 1 or 0 so
>> it really return a true value in both cases.
>
> Not true:
>
> {{{
> shlomi:~$ perl -le '$foo = 0; print +($foo == 1) ? "Foo is 1" : "Foo is not
> 1"'
> Foo is not 1
> shlomi:~$ perl -le '$foo = 1; print +($foo == 1) ? "Foo is 1" : "Foo is not
> 1"'
> Foo is 1
> shlomi:~$
> }}}
>


Ah sorry for my sloppy answer without the pratical code-test.
Thanks.

-- 
To unsubscribe, e-mail: beginners-unsubscr...@perl.org
For additional commands, e-mail: beginners-h...@perl.org
http://learn.perl.org/


Reply via email to