On Wed, May 04, 2005 at 11:00:46PM -0700, David Wheeler wrote:
: On May 4, 2005, at 22:31 , Larry Wall wrote:
: 
: >    given "hello" {
: >        when /hello/ {
: >            say "One";
: >            if /hello/ { say "Two"; }
: >            if /hello/ { say "Three"; }
: >            continue;
: >        }
: >        say "Four";
: >    }
: 
: Is there no more
: 
:   say "Two" if /hello/;
: 
: ?

You must have missed the implied "..." at the end of my list of other WTDI.
You can also do any of:

    say "Two" if /hello/;
    /hello/ && say "Two";
    /hello/ and say "Two";
    /hello/ ?? say "Two" :: leave;
    infix:<and>(/hello/, { say "Two" })
    continue unless /hello/; say "Two";
    /hello { say "Two" }/;
    s/hello/{ say "Two" }$0/;
    ({}, { say "Two" })[?/hello/]();

and probably a few more I can't think of off the top of my head.

Larry

Reply via email to