Re: splice without the remove

2009-11-09 Thread Dermot
2009/11/9 Shawn H Corey : ... > use Data::Dumper; > > # Make Data::Dumper pretty > $Data::Dumper::Sortkeys = 1; > $Data::Dumper::Indent   = 1; > > # Set maximum depth for Data::Dumper, zero means unlimited > $Data::Dumper::Maxdepth = 0; > > my @array = (1, 4, 6, 9, 2); > my @list = @array[ 1 .. 3 ]

Re: splice without the remove

2009-11-09 Thread Jim Gibson
On 11/9/09 Mon Nov 9, 2009 10:46 AM, "Dermot" scribbled: > Hi, > > I just spent 20mins scratching my head because I didn't read the docs > very closely concerning splice. I had assumed it left the array > intact, its doesn't. I was hoping for a function more akin to substr > where the return w

Re: splice without the remove

2009-11-09 Thread Shawn H Corey
Dermot wrote: > Hi, > > I just spent 20mins scratching my head because I didn't read the docs > very closely concerning splice. I had assumed it left the array > intact, its doesn't. I was hoping for a function more akin to substr > where the return would be the offset -> length of the array but t

splice without the remove

2009-11-09 Thread Dermot
Hi, I just spent 20mins scratching my head because I didn't read the docs very closely concerning splice. I had assumed it left the array intact, its doesn't. I was hoping for a function more akin to substr where the return would be the offset -> length of the array but the value it was working on