Loading ...
Sorry, an error occurred while loading the content.

Re: [PBML] Digest Number 95

Expand Messages
  • Ben Maynard
    if (! $y) { # your code } Possibly?
    Message 1 of 1 , Aug 23, 2000
    • 0 Attachment
      if (! $y) {
      # your code
      }

      Possibly?



      At 10:09 23/08/00 +0000, you wrote:
      >
      >
      >There is 1 message in this issue.
      >
      >Topics in this digest:
      >
      > 1. undef test?
      > From: Bob Fulwiler <bobf@...>
      >
      >
      >________________________________________________________________________
      >________________________________________________________________________
      >
      >Message: 1
      > Date: Tue, 22 Aug 2000 08:14:59 -0700
      > From: Bob Fulwiler <bobf@...>
      >Subject: undef test?
      >
      >Hi Folks,
      >
      >I have inherited a script with a problem I do not know how to fix. It
      >is using a hashed array indexed by a variable (i.e., $xx{$y}). It dies
      >when the index ($y) is undefined. I have tried using the 'defined'
      >function, but it usually lies about undefined variables (values?).
      >Anyone know of a good way to check for undefined variable before they
      >get used?
      >
      >TIA,
      >Bob
      >
      >--
      >Bob Fulwiler
      >UNIX System Administrator
      >425 865-4712
      >Bellevue Site Operations
      >
      > >From the city that gave you the 747, Windows, and caffiene...
      >
      >
      >
      >
      >
      >________________________________________________________________________
      >________________________________________________________________________
    Your message has been successfully submitted and would be delivered to recipients shortly.