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/