Let\'s say I have this
#!/usr/bin/perl %x = (\'a\' => 1, \'b\' => 2, \'c\' => 3);
and I would like to know if the value 2 is a ha
Shorter answer using smart match (Perl version 5.10 or later):
print 2 ~~ [values %x];