in reply to Re: if statement/uninitialized value
in thread if statement/uninitialized value
if the file doesn't exist it shouldn't run the if statement, right?Right. So the code to be executed if the given condition is true won't be executed because -e undef will always return false.
if it doesn't run the if statement i shouldn't get the errorBut the condition still has to be tested, so $info still has to be evaluated and the warning will be raised if $info hasn't been initialised at that point.
_________
broquaint
[1] for more info on warnings in perl see the perllexwarn and perldiag manpages
|
|---|