develooper Front page | perl.perl6.language | Postings from October 2006

Re: Nested statement modifiers.

Thread Previous | Thread Next
From:
Paul Seamons
Date:
October 3, 2006 11:06
Subject:
Re: Nested statement modifiers.
Message ID:
200610031206.01926.mail@seamons.com
> Of course, that wasn't exactly what you were asking, but it does present
> a practical solution when you want to:
>
> 	{say $_ for =<>}.() if $do_read_input;
>
> Which I just verified works fine under current pugs.

Thank you.

Hadn't thought of that.  I think that is workable.

But it also brings the question:  If you can do it ugly [1] easily, why not 
allow for it do be done prettily [2] ?

say $_ for =<> if $do_read_input

Paul



[1] It isn't really that ugly - just not as pretty.
[2] Arguably the "pretty" version is also more ambiguous whereas the "ugly" 
version leaves little room for doubt.

Thread Previous | Thread Next


nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About