in reply to How might I handle a special tree?

Using splice to replace a subset of the top level array with an anonymous array holding the values replaced is fairly easy:

@sorted = 0 .. 9;; splice @sorted, 1, 8, [ @sorted[ 1 .. 8 ] ];; pp @sorted;; (0, [1, 2, 3, 4, 5, 6, 7, 8], 9)

However, if you need to perform that same operation on one of the nested anonymous arrays, it gets somewhat more complicated:

splice @{ $sorted[1] }, 1, 6, [ @{ $sorted[ 1] }[ 1 .. 6 ] ];; pp @sorted;; (0, [1, [2, 3, 4, 5, 6, 7], 8], 9)

And if you need to go deeper still, it starts to get quite unweildy:

splice @{ $sorted[1][1] }, 1, 4, [ @{ $sorted[1][1] }[ 1 .. 4 ] ];; pp @sorted;; (0, [1, [2, [3, 4, 5, 6], 7], 8], 9)

With the rise and rise of 'Social' network sites: 'Computers are making people easier to use everyday'
Examine what is said, not who speaks -- Silence betokens consent -- Love the truth but pardon error.
"Science is about questioning the status quo. Questioning authority".
In the absence of evidence, opinion is indistinguishable from prejudice.