.------[ Diego Riano wrote (2002/10/08 at 16:50:41) ]------
 | 
 |  Hello all
 |  
 |  I have an array like this:
 |  
 |  @array=(1,2,3,4,5,6);
 |  
 |  And I would like to join the element starting from the third one until
 |  the lasta want.  Something like:
 |  
 |  join (",",$array[2],$array[3],$array[4],$array[5]);
 |  
 |  The problem I have is that this array will chance from time to time
 |  sometimes being bigger sometimes being smaller, so I need a way to join
 |  the elements from the third element to last one..
 |  any Ideas!!
 |  
 `-------------------------------------------------

    Easiest way would be something along the lines of: 

    # Build a temporary array 
    my @tmp_array = @array; 

    # remove the first two elements 
    shift(@tmp_array); 
    shift(@tmp_array); 

    join(",", @tmp_array); 

    Hope this helps. 

 ---------------------------------
   Frank Wiles <[EMAIL PROTECTED]>
   http://frank.wiles.org
 ---------------------------------


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

Reply via email to