xx and closures

2005-03-28 Thread Luke Palmer
We were discussing on #perl6, and thought that the feature: sub foo () { say Blech; } { foo() } xx 5; Would be useful. Since it is dwimmery, and you wouldn't want the closure to execute if you didn't know it was there, we decided that it would probably be best if this were

Re: xx and closures

2005-03-28 Thread Juerd
Luke Palmer skribis 2005-03-28 6:57 (-0700): We were discussing on #perl6, and thought that the feature: sub foo () { say Blech; } { foo() } xx 5; In the context of x, it makes even more sense. Especially if you consider, for example, creating a random password: my

Re: xx and closures

2005-03-28 Thread Juerd
Juerd skribis 2005-03-28 16:05 (+0200): In the context of x, it makes even more sense. Especially if you consider, for example, creating a random password: my $password = { any('a'..'z').pick } x 5; I wonder now if that can just be my $password = any('a'..'z') x 5; (No reason to not

Re: xx and closures

2005-03-28 Thread Eirik Berg Hanssen
Juerd [EMAIL PROTECTED] writes: I wonder now if that can just be my $password = any('a'..'z') x 5; Wouldn't that generate a junction, and so need a .pick? my $password = (any('a'..'z') x 5).pick; Or perhaps just leave it a junction, to use as a generator: my $any_password