in reply to Re^4: a simple question...
in thread a simple question...

Yes. Use the List::Util first function.
use 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"; }
- Miller