Beefy Boxes and Bandwidth Generously Provided by pair Networks
Problems? Is your data what you think it is?
 
PerlMonks  

Re: Linked list in Perl

by LanX (Canon)
on Sep 29, 2012 at 23:26 UTC ( #996435=note: print w/ replies, xml ) Need Help??


in reply to Linked list in Perl

> Or is there any better way to create a Linked List in perl??

Arrays of length 2 consume far less memory. See for instance "Higher Order Perl" or many examples here in the archives.

like here Re: How to implement Linked List

If you're desperate, you could even try increase compactness by using dualvars assigning references to the number slot and values to the string slot. see Scalar::Util (don't know if it's practical =)

Cheers Rolf


Comment on Re: Linked list in Perl

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others chanting in the Monastery: (13)
As of 2014-10-21 12:15 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    For retirement, I am banking on:










    Results (103 votes), past polls