in reply to Trying to slice off all array elements but the last one

@{$arrayref}[0 .. $#{$arrayref}-1] perhaps?

CountZero

"If you have four groups working on a compiler, you'll get a 4-pass compiler." - Conway's Law