in reply to A Splice of life

All perl built-in functions have documetation. On your command line type this:
perldoc -f splice
and you will see this:
splice ARRAY,OFFSET,LENGTH,LIST splice ARRAY,OFFSET,LENGTH splice ARRAY,OFFSET splice ARRAY
your $x needs to be an 'int' not a 'string', and $z should be an array - @z (splice returns an array - you could catch the output as a scalar to see how many lines were spliced - but usually you want the array back).

jeffa

L-LL-L--L-LL-L--L-LL-L--
-R--R-RR-R--R-RR-R--R-RR
F--F--F--F--F--F--F--F--
(the triplet paradiddle)