In a while loop reading lines from $FH, I get error:
Use of uninitialized value in string eq at file.pm line 103
My code is this:
100 if ( !defined( $data->{$id}{'HOST'} ) ) { 101 printf("no HOST defined at data->{%s}\n", $id); 102 } 103 if ($data->{$id}{'HOST'} eq "" ) { 104 # do this 105 } else { 106 # do that 107 }
I don't see the output from line 101 so there must be something in $data->{$id}{'HOST'}, correct? So how can I possibly get the error from line 103 then?
In reply to if not defined question by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |