my $foo=1;
my @bar=(2, 3, 4);
my @baz=$foo ^+ @bar; # @baz=(3, 4, 5)
Does that extend to multiple dimensions?
my @foo=(1, 2; 3, 4);
my @bar=(5, 6);
my @baz=@foo ^+ @bar; # Is @baz=(6, 8; 8, 10)?
How does that interact with ragged arrays?
my @foo=([1, 2], 3; 4, [5, 6]);
my @bar=(7, 8);
my @baz=@foo ^+ @bar; # ???
--Brent Dax <bren...@cpan.org>
@roles=map {"Parrot $_"} qw(embedding regexen Configure)
Wire telegraph is a kind of a very, very long cat. You pull his tail in
New York and his head is meowing in Los Angeles. And radio operates
exactly the same way. The only difference is that there is no cat.
--Albert Einstein (explaining radio)
Sort of, yes.
Basically the behaviour of hyper-operated operators is delegated via
multimethod dispatch to the hyper-operator functions. By default the
base perl variables will expand themselves out, but the engine itself
won't enforce this, as the classes can potentially overload the
hyper-operators.
So if the multiple-dimensional aggregate provides a proper "operate
against a single scalar" method that goes multidimensionally, then
we'll do that. If it doesn't, we won't.
--
Dan
--------------------------------------"it's like this"-------------------
Dan Sugalski even samurai
d...@sidhe.org have teddy bears and even
teddy bears get drunk
# multimethod dispatch to the hyper-operator functions. By default the
Well, yeah. But that doesn't really answer my question. :^) What's
the *language-level* behavior?
Why, yes, actually. :-P But I've been using Pompous English Spelling for years.
># multimethod dispatch to the hyper-operator functions. By default the
>
>Well, yeah. But that doesn't really answer my question. :^) What's
>the *language-level* behavior?
Well, it does, though. Saying it's delegated to the variables and
they have a default behavior's different than saying "this is the
behaviour".