- Milleruse List::Util qw(first); if (my $match = first {$input{$_}} qw(info1 info2 info3)) { print "First Matched key: $match"; print "First Matched value: $input{$match}"; } else { print "none of the conditions were met\n"; }
In reply to Re^5: a simple question...
by wind
in thread a simple question...
by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |