Beefy Boxes and Bandwidth Generously Provided by pair Networks
Do you know where your variables are?

Re: Linked list in Perl

by LanX (Bishop)
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

Log In?

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://996435]
and all is quiet...

How do I use this? | Other CB clients
Other Users?
Others contemplating the Monastery: (2)
As of 2018-02-19 22:26 GMT
Find Nodes?
    Voting Booth?
    When it is dark outside I am happiest to see ...

    Results (266 votes). Check out past polls.