At 01:55 PM 8/9/00 +0200, Bart Lateur wrote:
>On Wed, 9 Aug 2000 09:11:55 +0100 (BST), Nick Ing-Simmons wrote:
>
> >>  @foo = @bar * 12;
> >
> >I like it.
>
> >It is pretty obvious what above should do:
> >
> >@foo = ();
> >foreach my $elem (@bar)
> > {
> >  push(@foo,$elem * 12);
> > }
>
>         @foo = map { $_ * 12 } @bar;
>
>
>I don't see the need for a new notation.

Well, compactness for one. With a scalar on one side it's less odd (it was 
a bad example). When funkier, though:

   @foo = @bar * @baz;

the expansion becomes less obvious and quite a bit larger, especially if 
the arrays are multidimensional.

                                        Dan

--------------------------------------"it's like this"-------------------
Dan Sugalski                          even samurai
[EMAIL PROTECTED]                         have teddy bears and even
                                      teddy bears get drunk

Reply via email to