David Arnold wrote:
> All,
>
> If:
>
> $state={};
Now state is a reference to an anonymous HASH
>
> Then, what is:
>
> !$state
This is '' (i.e. "false"), because the ! operator returns 1 ("true") only
for the values '', 0, and undef. Any reference will be "true" in this test,
even a reference to a false value.
Consider:
$foo = \0;
!$foo is false, because $foo is a reference
!$$foo is true, because the scalar $foo refers to is false
Make sense?
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
<http://learn.perl.org/> <http://learn.perl.org/first-response>