Beefy Boxes and Bandwidth Generously Provided by pair Networks
No such thing as a small change
 
PerlMonks  

Re: Array vs. Hash for sparsely integer-indexed data

by tobyink (Abbot)
on Jan 25, 2013 at 22:49 UTC ( #1015424=note: print w/ replies, xml ) Need Help??


in reply to Array vs. Hash for sparsely integer-indexed data

You could tie an array to a hashref for storage. This would be lovely in terms of memory usage, but not especially performant.

package Cow { use Moo; has name => (is => 'lazy', default => sub { 'Mooington' }) } say Cow->new->name


Comment on Re: Array vs. Hash for sparsely integer-indexed data

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others taking refuge in the Monastery: (13)
As of 2015-07-29 17:32 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 (266 votes), past polls