Beefy Boxes and Bandwidth Generously Provided by pair Networks
Your skill will accomplish
what the force of many cannot
 
PerlMonks  

A familiar mantra

by belg4mit (Prior)
on Jun 21, 2015 at 17:21 UTC ( [id://1131352]=poem: print w/replies, xml ) Need Help??

do{ … } || !do{ … };

"Do or do not, there is not try."

Alternatively:

#try{ do{ … } || !do{ … }; #}

--
In Bob We Trust, All Others Bring Data.

Replies are listed 'Best First'.
Re: A familiar mantra
by toolic (Bishop) on Jun 21, 2015 at 17:33 UTC
    When I copy this code, the ... shows up as character 0x85, and I get a compile error. If I change to 3 single periods, I get a runtime error. This runs without errors for me:
    do{ } || !do{ };
      The true ellipses were used for aesthetics, the bastard ASCII analog are meant to cause a runtime error. Or, more accurately, an exception… but of course, there is no try ;-)

      --
      In Bob We Trust, All Others Bring Data.

Re: A familiar mantra
by kcott (Archbishop) on Jun 26, 2015 at 21:53 UTC

    Given ... turned up in v5.12 as the Yada Yada Operator, perhaps this (which runs without compile-time or runtime errors):

    do { Yada } or not do { Yada }

    -- Ken

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: poem [id://1131352]
Approved by ww
Front-paged by ww
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others taking refuge in the Monastery: (5)
As of 2024-03-29 11:12 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found