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

RE: [PBML] undef test?

Expand Messages
  • Smith, Sheldon
    I think you want the exists function, not the defined function.
    Message 1 of 1 , Aug 23, 2000
      I think you want the "exists" function, not the "defined" function.

      > -----Original Message-----
      > From: Bob Fulwiler [mailto:bobf@...]
      > Sent: Tuesday, August 22, 2000 10:15 AM
      > To: Perl Beginner
      > Subject: [PBML] 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?
    Your message has been successfully submitted and would be delivered to recipients shortly.