in reply to Use of uninitialized value in ...

Sometimes, using a newer version of Perl helps. E.g.

use strict; use warnings; my $x = ""; my $y; my $z = "Z"; if ($x =~ /X/ or $y =~ /Y/ or $z =~ /Z/) { print "cond true\n" }

Perl 5.8.8

$ ./669664.pl
Use of uninitialized value in pattern match (m//) at ./669664.pl line 10.
cond true

Perl 5.10.0

$ ./669664.pl
Use of uninitialized value $y in pattern match (m//) at ./669664.pl line 10.
cond true

Replies are listed 'Best First'.
Re^2: Use of uninitialized value in ...
by pascaldee (Acolyte) on Feb 22, 2008 at 22:56 UTC
    Amazing! :-) Can't wait to use 5.10...