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

It's also not what the OP wanted. The idea was to slice the array non-destructively Messing with $#foo is also very mean to your maintainer(s). It's the very definition of action-at-a-distance. In other words, Don't do this unless you know exactly why you shouldn't.

------
We are the carpenters and bricklayers of the Information Age.

Please remember that I'm crufty and crochety. All opinions are purely mine and all code is untested, unless otherwise specified.

  • Comment on Re: Re: Trying to slice off all array elements but the last one