Beefy Boxes and Bandwidth Generously Provided by pair Networks Joe
Welcome to the Monastery
 
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 perusing the Monastery: (6)
As of 2014-04-20 14:21 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    April first is:







    Results (485 votes), past polls