Also outputs "elephants".use strict; use warnings; use Benchmark qw(:all) ; my @foo = qw/1 2 3 4 5 6/; my %bar = (pack('b', @foo) => 'elephants'); my @baz = qw/1 a 4 6 7/; print $bar{pack('b', @baz)} . "\n";
In reply to Re^2: non-scalar hash key
by tweetiepooh
in thread non-scalar hash key
by kdejonghe
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |