On Oct 29, Will Muir said:

>I have an array of arrays @data that I would like to take the reference
>of the 5th element of the first 3 elements and put them into another
>array and then shorten @data by 3.  I hope that this makes sense, I am
>new to this and don't really know a better way too explain it.  Here is
>what I have so far.

>     my $t=0;
>     my$value=4;
>     my @n;
>     my @tmp;
> 
>     #start a loop for every row
>     for(my $i=0; $i<$#data; $i++){
>          #build an array @n with $t values in it
>          for (my $j=0; $j<$t; $j++){

I don't understand the task, but $t is 0 here, and you never change it --
that means this loop never gets executed.

>               $tmp[$j]=$data[$j][$value];
>               shift @data;
>               print @tmp;
>          }
>     }
>

-- 
Jeff "japhy" Pinyan      [EMAIL PROTECTED]      http://www.pobox.com/~japhy/
RPI Acacia brother #734   http://www.perlmonks.org/   http://www.cpan.org/
** Look for "Regular Expressions in Perl" published by Manning, in 2002 **


-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to