RE: array/hash manipulation [was :what's with 'with'?]

2001-07-21 Thread jh_lists
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 explanation in the

Re: aliasing - was:[nice2haveit]

2001-07-18 Thread jh_lists
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 synonym for for would

Re: one more nice2haveit

2001-07-18 Thread jh_lists
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:

Re: You can't make a hot fudge sundae with mashed potatoes instead of ice cream, either.

2001-07-10 Thread jh_lists
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 (where N ==