in reply to Trying to slice off all array elements but the last one
Negative ranges don't work. Try instead:
reverse( @{ $arrayref }[ -2 .. 0 ])Update: I misread the question, but that doesn't mean that negative ranges don't work. :)
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Re: Trying to slice off all array elements but the last one
by Paladin (Vicar) on Feb 16, 2004 at 20:56 UTC | |
|
Re: Re: Trying to slice off all array elements but the last one
by talexb (Chancellor) on Feb 16, 2004 at 20:58 UTC |