in reply to Re^2: warning: use of uninitialized value
in thread warning: use of uninitialized value

for the OP might be worth only add few words about || and or: the high precedence || is valid and right as we put parens, without parens has another effect:
use strict; use warnings; open my $fh, '<', 'notexistant.txt' or die qq(File open failed); #OK +: File open failed at open (my $fh, '<', 'notexistant.txt') || die qq(File open failed); #OK + too: File open failed at.. open my $fh, '<', 'notexistant.txt' || die qq(File open failed); #WR +ONG print <$fh>; # r +eadline() on closed filehandle $fh at..
Just think of "and" and "or" as being the same as && and ||, but so low on the precedence chart that parenthesis are usually unnecessary to keep the things on the left or on the right properly grouped. It is almost always considered better to use "or" instead of "||" when you work with open.
is a quote from a a very useful post about idioms and precedences: Perl Idioms Explained - && and || "Short Circuit" operators

L*
There are no rules, there are no thumbs..
Reinvent the wheel, then learn The Wheel; may be one day you reinvent one of THE WHEELS.