On Fri 06 Apr, John Porter wrote:
> Richard Proctor wrote:
> > but what should 
> >       @bar = @foo x 2;
> > do?  Repeat @foo twice or repeat each element twice?  (its current
> > behaviour is less than useless, other than for JAPHs)
> 
> How is one significantly less useful than the other?
> 

Its current behaviour is to assign to $bar[0] the length of @foo repeated
twice.

  DB<1> @foo = (1,2,3)

  DB<2> @bar = @foo x 2

  DB<3> p "@bar"
33
  DB<4> p $bar[0]
33

This is what I call less than useless, perhaps you are thinking of,
the current behavior of @bar = (@foo) x 2

  DB<5> @bar = (@foo) x 2

  DB<6> p "@bar"
1 2 3 1 2 3

Which has real application.

Richard
-- 

[EMAIL PROTECTED]

Reply via email to