Tim Johnson said:
> 
> 
>Someone can probably give a better answer, but practically speaking, this is what 
>I've seen to be true (someone please give me a verbal whipping if I'm off here):
> 
>Perl evaluates a statement as false if it 
> 
>a) is undefined
>b) evaluates to 0
>c) evaluates to '' (empty string)
> 
>and evaluates to true if it is not false.
> 
>"$state = ()" assigns the value of an empty list to the scalar $state, so it would 
>evaluate to false.
>"$state = []", however, assigns a reference to an anonymous array to $state.  It 
>looks something like this:  ARRAY 0x9999999 (I don't know how many digits).  
>This is not case a,b,or c above, so it is true, even though the dereferenced array 
>itself (@{$state}) may be empty, and evaluate to false.
Thanks.
> 
>As for the way the reference docs are set up, I agree with you that they are not very 
>intuitive.  I personally recommend installing ActivePerl on a computer somewhere so 
>that you have the benefit of all of the documentation converted to HTML in a much 
>more intuitive format.
Nah, didn't say that. I just didn't know how to search the docs. 'perldoc
perl' suggested by Randy has sorted me right out. I don't believe
ActivePerl is available for my OS, at least I didn't find it with
apt-cache search.

A quick line in 'perldoc perldoc' suggesting 'perldoc perl' will tell you
what is available would do the trick nicely from my point of view. But
that's not to say my point of view is the most important, there may well
be a good reason for it not to be there. And yes, I should have thought
of trying 'man perl' but I'm thick ;)
-- 
Kind regards,
Hal Ashburner

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