in reply to Re: A Warning Issue!
in thread A Warning Issue!

Yes it is!
$data = (); $sql = sprintf $sql_fmt, $account->[$i]{ 'ACCOUNT#' }; $data = exec_select( $sql ); foreach (@$data) { ....

Replies are listed 'Best First'.
Re^3: A Warning Issue!
by olus (Curate) on Feb 19, 2008 at 16:53 UTC

    From this snippet and the first one I can understand that data is an array that references hashes. This last snippet shows that data may be defined with the result of the call to exec_select. Still, that shows no guarantee that the hashes in data have the keys $_->{TEST34} and $_->{TEST33}. You may be assuming that they are present, but they are not.

      Yes it could be it, but how could I prevent the warning if they have no value?

        You could break your if statement and check separately if those elements are defined.

        if(defined $_->{ TEST33 } && $_->{ TEST33 } ) { # do something with $_->{ TEST33 } # like setting pre-check vars to be used in later conditionals }