Re: slice indexing

2003-01-13 Thread Bryan Harris
>> I need to slice an array such that it gives me the first through the 4th to >> last in a variable length array. I thought I could just do: >> >> @comments[0..-4] >> >> but Perl seems to choke on this. It's perfectly okay with a slice using two >> negative #s: >> >> @comments[-2..-4] >

Re: slice indexing

2003-01-12 Thread Rob Dixon
"Rob Dixon" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED]... > Hi Bryan > > "Bryan Harris" <[EMAIL PROTECTED]> wrote in message > [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... > > > > I need to slice an array such that it gives me the first through the 4th > to > > last in a variable

Re: slice indexing

2003-01-12 Thread John W. Krahn
Bryan Harris wrote: > > I need to slice an array such that it gives me the first through the 4th to > last in a variable length array. I thought I could just do: > > @comments[0..-4] > > but Perl seems to choke on this. It's perfectly okay with a slice using two > negative #s: > > @commen