"Sterin, Ilya" <[EMAIL PROTECTED]> wrote:
> Just one question, how
> would merge behave on two different sized arrays.
>
> @a = (1..5);
> @b = (1..10);
> merge(@a, @b);
>
> ##Would return (1,1,2,2,3,3,4,4,5,5,??
>
> Would it stop on the shortest array. Couldn't quite find such explanat
> I've go tired of typing :"), but if I had current index-iterator ( say under
> $i just as example) at hand the way I have $_ i can just type :
>
> print "$_ : $b[$i]\n" for @a;
> OR
> print "$a[$i] : $b[$i]\n" for @a;
>
For a general solution to this see Buddha Buck's RFC on iterators:
Bart Lateur wrote:
> On Wed, 18 Jul 2001 09:00:25 -0400, John Porter wrote:
> >for ( $XL->{Application}->{ActiveSheet} ) {
> > $_->cells(1,1) = "Title";
> > $_->language() = "English";
> >}
> >
> >(presuming lvalue-methods, of course...)
>
> So, in this case, a "with" s
> > I haven't been tricked into reading MJD's article yet, but might your
> > third option be multiple functions with parameter-type-based dispatch?
> > We can do that with perl 5, but it isn't automatic.
>
> The problem with polymorphic functions is you have to rewrite the
> function N times (wh