[EMAIL PROTECTED] wrote:
On Mar 25, 8:50 am, [EMAIL PROTECTED] (Sharan Basappa) wrote:
Is there a way I can copy only part of an array into another array.
For example, I want to copy only first 8 elements of source array
into destination array.
You can use the splice( ). See example:
#!/usr
On Tue, Mar 25, 2008 at 12:14 PM, LesleyB <[EMAIL PROTECTED]> wrote:
snip
> BTW I use a Debian system and use perldoc quite a lot. To check the
> syntax for this problem I did
> 'perldoc perlintro' and then searched for the word array. The
> solution to your problem is there. Not sure how yo
Sharan Basappa wrote:
> Hi,
>
> Is there a way I can copy only part of an array into another array.
> For example, I want to copy only first 8 elements of source array
> into destination array.
>
> Regards
I think you might need this technique
#!/usr/bin/perl -w
use strict;
#
my @arr1 =
On 25 Mar, 23:50, [EMAIL PROTECTED] (Sharan Basappa) wrote:
> Hi,
>
> Is there a way I can copy only part of an array into another array.
> For example, I want to copy only first 8 elements of source array
> into destination array.
>
> Regards
Sure there is,
@rainbow = ("red", "green", "blue", "y
On Mar 25, 8:50 am, [EMAIL PROTECTED] (Sharan Basappa) wrote:
> Hi,
>
> Is there a way I can copy only part of an array into another array.
> For example, I want to copy only first 8 elements of source array
> into destination array.
>
> Regards
Hi,
You can use the splice( ). See example:
#!/us
Sharan Basappa wrote:
On Tue, Mar 25, 2008 at 9:31 PM, Rob Dixon <[EMAIL PROTECTED]> wrote:
>>
Sharan Basappa wrote:
> Hi,
>
> Is there a way I can copy only part of an array into another array.
> For example, I want to copy only first 8 elements of source array
> into destination array.
thanks. I can also assume that variables work instead of 0..7 ($1..$2)
so that I can
write this as an general algo
On Tue, Mar 25, 2008 at 9:31 PM, Rob Dixon <[EMAIL PROTECTED]> wrote:
>
> Sharan Basappa wrote:
> > Hi,
> >
> > Is there a way I can copy only part of an array into another array.
Sharan Basappa wrote:
Hi,
Is there a way I can copy only part of an array into another array.
For example, I want to copy only first 8 elements of source array
into destination array.
my @dest = @source[0..7];
Rob
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: