P is for Practical | |
PerlMonks |
Re^2: hash key regular expression patternby Anonymous Monk |
on Feb 19, 2015 at 13:58 UTC ( [id://1117219]=note: print w/replies, xml ) | Need Help?? |
use List::Util qw<first>;
print $cat{ ( first { m/CHICAGO/i } keys %cat ) || '' };
In Section
Seekers of Perl Wisdom
|
|