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
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
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
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