Anonymous Monk has asked for the wisdom of the Perl Monks concerning the following question:
I am trying to get the rest of the array once a certain element has been matched, however, I am struggling to then split the rest of the array into individual elements so I can access each individually.
I was wondering if there was a way to capture the rest of the array (as i have done below) but to also add a whitespace character after every subsequent element is found??? Thanks a lot!
for (my $i=0; $i < @start_incline; $i++) { if ($start_incline[$i] == $sorted_nums[0]) { @incline = @start_incline [$i+1 .. $#start_incline]; } }
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: saving rest of array after a match
by broquaint (Abbot) on Jun 27, 2003 at 09:32 UTC | |
|
Re: saving rest of array after a match
by ViceRaid (Chaplain) on Jun 27, 2003 at 09:30 UTC | |
|
Re: saving rest of array after a match
by Tomte (Priest) on Jun 27, 2003 at 09:41 UTC | |
|
Re: saving rest of array after a match
by thinker (Parson) on Jun 27, 2003 at 10:25 UTC | |
by pzbagel (Chaplain) on Jun 27, 2003 at 17:44 UTC |