Diego Riano wrote:
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
read up on slices;
join (,, @array[2 .. $#array]);
-Original Message-
From: Diego Riano [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, October 08, 2002 10:51 AM
To: [EMAIL PROTECTED]
Subject: Joining array elements
Hello all
I have an array like this:
@array=(1,2,3,4,5,6);
.--[ 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
join ,, @array[2...$#array];
works nicely for me.
Frank Wiles wrote:
.--[ 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
: Diego Riano; [EMAIL PROTECTED]
Subject: Re: Joining array elements
join ,, @array[2...$#array];
works nicely for me.
Frank Wiles wrote:
.--[ 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