in reply to Re: non-scalar hash key
in thread non-scalar hash key
Nice but not in the gold
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";
|
---|
Replies are listed 'Best First'. | |
---|---|
Re^3: non-scalar hash key
by Arunbear (Prior) on Jun 18, 2009 at 10:05 UTC |
In Section
Seekers of Perl Wisdom