How can I check if value exists before actually use it ?sub get_attribute { my ( $self, $attribute ) = @_; if ((exists( $self->{ATTRIBUTES} )) and ( defined( ${ $self->{ +ATTRIBUTES} }{$attribute} ) ) ) { return ${ $self->{ATTRIBUTES} }{$attribute}; } return undef; }
In reply to Use of uninitialized value in hash element at by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |