in reply to Re: appending arrays
in thread appending arrays
Here's a similar way, without initializing either counter:
By the way, your array accesses are using 1 element slices instead of direct element access. Consider changing @array1[$a1count] to $array1[$a1count].push @new, $array1[$count1++].$array2[--$count2] while ($count1 < @array1 && -$count2 < @array2);
|
---|
In Section
Seekers of Perl Wisdom