Help for this page
my @ILO_ERRORS = (); # Empty LIST; not {}, which is a hash ref ... ... if (@ILO_ERRORS) { print "SNMP CRITICAL - @ILO_ERRORS \n"; # Note - array interpolated + INSIDE QUOTES, "\n" added ...
my ($key) = grep {$error_code{$_} =~/$element/} keys %error_code; # Note - parens around ($key) provide the required list context $key and push @ILO_ERRORS, $error_code{$key};