Beefy Boxes and Bandwidth Generously Provided by pair Networks
Clear questions and runnable code
get the best and fastest answer
 
PerlMonks  

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

by insaniac (Friar)
on Mar 21, 2006 at 23:34 UTC ( [id://538346] : note . print w/replies, xml ) Need Help??

Help for this page

Select Code to Download


  1. or download this
    #!/usr/bin/perl
    use strict;
    ...
    if ( defined $factories{$tmpf} ) {
        print "yay!\n" if $match =~ m/$factories{$tmpf}/;
    }
    
  2. or download this
    farms
    farms
    yay!