Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl-Sensitive Sunglasses
 
PerlMonks  

Re^2: non-scalar hash key

by tweetiepooh (Friar)
on Jun 17, 2009 at 16:14 UTC ( #772459=note: print w/ replies, xml ) Need Help??


in reply to Re: non-scalar hash key
in thread non-scalar hash key

Nice but not in the gold

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";
Also outputs "elephants".


Comment on Re^2: non-scalar hash key
Download Code
Re^3: non-scalar hash key
by Arunbear (Parson) on Jun 18, 2009 at 10:05 UTC

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://772459]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others having an uproarious good time at the Monastery: (8)
As of 2015-07-07 00:01 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    The top three priorities of my open tasks are (in descending order of likelihood to be worked on) ...









    Results (85 votes), past polls