Link to home
Start Free TrialLog in
Avatar of spetrowitsch
spetrowitsch

asked on

error message: local variable in a subroutine is not initialised

I have defined a subroutine with a local variable. The local variable is a list. The compilation it isn't correct,its follow the error message:

"Use of unitialized value".

Here are the code

sub dat {
my @result_tmp;
open(T,"<$$QLRESULT");
$anz=0;
while($zeile=~m/ORA_VERSION/){
     chomp($zeile);
     $result_tmp[$anz]=$zeile;
     $anz=$anz+1;}
 close(T);
if ($result_tmp[0] eq "")#error-message
{ do something;}
}


ASKER CERTIFIED SOLUTION
Avatar of prakashk021799
prakashk021799

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of ozo
Where does $zeile come from?