in reply to zero vs undef

You are using || which tests for truth. 0 is false. Either use defined, or upgrade to 5.8.2 and install the defined-or patch, in which case you can replace your ||'s with //'s to get the results you intend.

Abigail

Replies are listed 'Best First'.
Re: Re: zero vs undef
by dragonchild (Archbishop) on Dec 09, 2003 at 21:12 UTC
    When will the defined-or patch be part of the main source? I don't want to install it on the machines I have at work because I want to keep the patches I have to re-apply to a minimum (right now, it's none and I like it that way).

    ------
    We are the carpenters and bricklayers of the Information Age.

    Please remember that I'm crufty and crochety. All opinions are purely mine and all code is untested, unless otherwise specified.

      When will the defined-or patch be part of the main source?
      It *is* part of the main source. But only in the development track, so if you want to run 'patch' only 0 times, you have to wait till 5.10.

      Abigail