in reply to Re^3: hash and array
in thread hash and array
would be pretty much the same as%hash{@array} >>++
if I understand correctly. Is that what you are asking? I think >> applies the operation to all of the elements of the array to the left of the >>. The best example of the >> and << things (I don't know what they are called... maybe not operators), would be%hash{$_}++ for @array
which is like@added = @array1 >>+<< @array2;
## p5 code, I'm not completely fluent in p6 yet... for ( my $i = 0; i < $#array1; i++ ) { $added[ $i ] = $array1[ $i ] + $array2[ $i ] }
-Bryan
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^5: hash and array
by ihb (Deacon) on May 23, 2005 at 00:02 UTC | |
by mrborisguy (Hermit) on May 23, 2005 at 00:12 UTC |