in reply to "uninitialized value in concatenation" is initialized and involves no concatenation that I can see.

Your undefined value is probably later on in the elsif chain. This is a common problem.

my $def1 = 'true'; my $def2 = 'foo'; my $def3 = 'blue'; my $undef1; if ( $def1 =~ /X/ ) { # <-- problem reported here print 'not here'; } elsif ( $def2 =~ /Y/ ) { print 'not here either'; } elsif ( $undef1 =~ /$def3/ ) { # <-- problem exists here print 'oh noes'; } else { print "happiness ensues\n"; }
  • Comment on Re: "uninitialized value in concatenation" is initialized and involves no concatenation that I can see.
  • Select or Download Code