At 12:04 AM -0700 9/18/02, Brent Dax wrote: >The Apocalypse on operators says that if one of the operands of a >hyperoperator is a scalar, then that scalar is (nominally) treated as an >array of copies of that scalar. In other words: > > my $foo=1; > my @bar=(2, 3, 4); > > my @baz=$foo ^+ @bar; # @baz=(3, 4, 5) > >Does that extend to multiple dimensions?
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 [EMAIL PROTECTED] have teddy bears and even teddy bears get drunk