my @ILO_ERRORS = (); # Empty LIST; not {}, which is a hash ref ... push @ILO_ERRORS, $error_code{$element}; .... if (@ILO_ERRORS) { print "SNMP CRITICAL - @ILO_ERRORS \n"; # Note - array interpolated INSIDE QUOTES, "\n" added ...