in reply to Re: implementing linklist structure in perl
in thread implementing linklist structure in perl

They aren't so tricky if you read perlfunc...

# remove the item you are pointing to splice( @list, $i, 1 ); # insert after the pointer splice( @list, $i+1, 0, $item_to_insert );

I suspect this is also going to be a lot faster than rebuilding the whole array.


We're not surrounded, we're in a target-rich environment!

Replies are listed 'Best First'.
Re^3: implementing linklist structure in perl
by roboticus (Chancellor) on May 13, 2007 at 13:34 UTC
    jasonk:

    ++ Thanks for the tip...that's another function I'll have to add to my arsenal. I refer to perlfunc frequently, but I just can't bring myself to read it from beginning to end to see what's in it. (The plot just isn't very interesting!)

    ...roboticus