* Juerd <[EMAIL PROTECTED]> [2006-06-18 14:10]:
> pugs> my @foo = 1, 2, 3, { 4 if 0 }.(), 5; say @foo.perl
> [1, 2, 3, 5]
> bool::true
> pugs> my @foo = 1, 2, 3, { 4 if 1 }.(), 5; say @foo.perl
> [1, 2, 3, 4, 5]
> bool::true
That’s “conceptually noisy” though… I don’t know if I’d end up
picking
$foo, $bar, { $baz if $wibble }.(), $quux
over
$foo, $bar, ( $wibble ?? $baz !! () ), $quux
With more complex “movable parts,” there would be even less
difference between the two than here.
Does Perl 6 have `do BLOCK` like Perl 5? That would make it
$foo, $bar, do { $baz if $wibble }, $quux
which I find more acceptable.
Regards,
--
#Aristotle
*AUTOLOAD=*_;sub _{s/(.*)::(.*)/print$2,(",$\/"," ")[defined wantarray]/e;$1};
&Just->another->Perl->hacker;