But my question is what is the optimal way to implement the functionality of "in" at "### in the above code (without looping entire array.use strict; my %hash = ( 'key01' => '1', 'key02' => '2', 'key03' => '3', ); my $key = 'key01'; if ($key in keys(%hash)) { ### print "$key is in hash"; }
In reply to Best way check key availability by banduwgs
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |