Beefy Boxes and Bandwidth Generously Provided by pair Networks
laziness, impatience, and hubris

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

by GrandFather (Saint)
on Mar 21, 2006 at 23:30 UTC ( [id://538344] : note . print w/replies, xml ) Need Help??

Help for this page

Select Code to Download

  1. or download this
    use strict;
    use warnings;
    print "$tmpf\n";   # prints 'farms'
    print keys( %factories), "\n";   # 'farms' is one of them.
    print "Is defined" if ( defined $factories{ $tmpf});
  2. or download this
    Is defined