Perl already has linked lists in effect, they are (as others have suggested) called arrays. The key to unlocking Perl arrays as linked lists is to know about splice. Perl arrays are not constant time node insertion and deletion, but are likely to be fast enough for most purposes and splice is easier to read than a bunch of code fooling around with the 'pointers' a linked list requires.
In reply to Re: How to implement Linked List
by GrandFather
in thread How to implement Linked List
by msk_0984
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |