implied looping (was: Re: type sigils redux, and new unary ^ operator)

2005-11-23 Thread Ruud H.G. van Tol
Larry Wall: for ^5 { say } # 0, 1, 2, 3, 4 The 'for' can go if a list (and also an array) would imply looping, when it is positioned next to a block: a. say (0..4); b. { say; say } (0..4); c. (0..4) { say; say } d. @{0..4} { say; say } (etc.) b. now produces 2 lines with 01234 (in

Re: implied looping (was: Re: type sigils redux, and new unary ^ operator)

2005-11-23 Thread Michele Dondi
On Wed, 23 Nov 2005, Ruud H.G. van Tol wrote: for ^5 { say } # 0, 1, 2, 3, 4 The 'for' can go if a list (and also an array) would imply looping, when it is positioned next to a block: a. say (0..4); b. { say; say } (0..4); I'm not really sure: while I like it for its conciseness -and

Re: implied looping (was: Re: type sigils redux, and new unary ^ operator)

2005-11-23 Thread Larry Wall
On Wed, Nov 23, 2005 at 02:23:51PM +0100, Ruud H.G. van Tol wrote: : Larry Wall: : : for ^5 { say } # 0, 1, 2, 3, 4 : : The 'for' can go if a list (and also an array) would imply looping, when : it is positioned next to a block: : : a. say (0..4); : b. { say; say } (0..4); : c. (0..4)

Re: implied looping (was: Re: type sigils redux, and new unary ^ operator)

2005-11-23 Thread Juerd
Larry Wall skribis 2005-11-23 9:19 (-0800): ^5.each { say } Without colon? Juerd -- http://convolution.nl/maak_juerd_blij.html http://convolution.nl/make_juerd_happy.html http://convolution.nl/gajigu_juerd_n.html