Thank you for your help! The Perl documents and mini-programs were great. Cheers, Sonal
On Jan 24, 2008 9:25 PM, Sonal Singhal <[EMAIL PROTECTED]> wrote: > So, what I want to do is go through an existing array and break the array > into mini-arrays at any certain points (where the diff. in two bordering > values are greater than 2000). I programmed it as a recursive function, but > I need to store all these "mini-arrays" and be able to sort them easily by > "mini-array". The problem with the array of arrays is I cannot get it to > treat each row as an array. Maybe if you can help me there... > > Also, if I am dynamically allocating my array of arrays, how can I find > out later my index values? > > Thanks for the advice thus far. > > > On Jan 23, 2008 6:21 PM, Jenda Krynicky < [EMAIL PROTECTED]> wrote: > > > From: "Sonal Singhal" < [EMAIL PROTECTED]> > > > Simple question, I hope... I am looping through a set of commands, and > > each > > > time, I want to create a unique array with a tag representing the loop > > > > > number. > > > > > > for (my $j = 1; $j < $#start_points; $j++){ > > > if ( abs($start_points[0] - $start_points[$j]) > 1999) { > > > my @{start_points."$n"} = > > @start_points[$j...$#start_points]; > > > my @{end_points."$n"} = @end_points[$j...$#start_points]; > > > } > > > } > > > > > > I would hope this would give me 'n' arrays: @start_points0, > > @start_points1, > > > etc. But this isn't working. > > > ERROR MESSAGE: Can't declare array dereference in my at > > > /Users/s/Desktop/shorttest.pl line 17, near "} =" > > > > > > I know I can do an array of arrays but that doesn't work well for the > > rest > > > of my program. > > > > You never want to have a row of variables like this. NEVER. Show us > > what "doesn't work well" with an array of arrays. > > > > Jenda > > ===== [EMAIL PROTECTED] === http://Jenda.Krynicky.cz ===== > > When it comes to wine, women and song, wizards are allowed > > to get drunk and croon as much as they like. > > -- Terry Pratchett in Sourcery > > > > > > -- > > To unsubscribe, e-mail: [EMAIL PROTECTED] > > For additional commands, e-mail: [EMAIL PROTECTED] > > http://learn.perl.org/ > > > > > > >