for my $var ( map lc, @vars ) { print "Value: " . $hash_ref->{$var} . "\n" if exists $hash_ref->{$var}; }