- or download this
my %hash =("var1", "info1", "var2", "info2", "var3", "info3");
- or download this
if (grep {$_ eq $where} @array) {
push @result_array, $hash{$where};
} else {
push @result_array, $where;
}
- or download this
push @result_array, $hash{$where} || $where;