Beefy Boxes and Bandwidth Generously Provided by pair Networks
There's more than one way to do things
 
PerlMonks  

Re^3: Why? uninitialized value in pattern match when using if (defined)

by kwaping (Priest)
on Mar 22, 2006 at 22:51 UTC ( [id://538624] : note . print w/replies, xml ) Need Help??


in reply to Re^2: Why? uninitialized value in pattern match when using if (defined)
in thread Why? uninitialized value in pattern match when using if (defined)

Thank you for the reply, you make a good point that I didn't consider.

---
It's all fine and dandy until someone has to look at the code.
  • Comment on Re^3: Why? uninitialized value in pattern match when using if (defined)

Replies are listed 'Best First'.
Re^4: Why? uninitialized value in pattern match when using if (defined)
by Dervish (Friar) on Mar 23, 2006 at 02:14 UTC
    (Sorry for the delay in responding -- I thought I had written a reply, but apparently I haven't figured out the interface software, entirely, yet). Anyway, I've decided to rewrite the offending code. It appears as if the actual problem was something inside the block guarded by if ( defined $factories{ $tmpf}) -- cleaning that error up removed the warning. I'll try to post a more complete code snippet next time - I had intended to clean it up so it would be least confusing, and clearly went too far. Thanks to all who replied. I was rather surprised at the quantity (and helpfulness) of the responses.