On Mon, Mar 29, 2010 at 10:27 PM, Shlomi Fish <[email protected]> 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: [email protected]
For additional commands, e-mail: [email protected]
http://learn.perl.org/