- or download this
if (my @values = grep {$_} @input{qw(info1 info2 info3)}) {
print "Matched values: @values";
...
else {
print "none of the conditions were met\n";
}
- or download this
if (my @matches = grep {$input{$_}} qw(info1 info2 info3)) {
print "Matched keys: @matches";
...
else {
print "none of the conditions were met\n";
}