Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl Monk, Perl Meditation
 
PerlMonks  

Re: Bare BLOCK vrs. grep BLOCK

by kcott (Archbishop)
on Jan 16, 2018 at 10:26 UTC ( [id://1207346]=note: print w/replies, xml ) Need Help??

Help for this page

Select Code to Download


  1. or download this
    $ perl -E 'sub W { grep { say "x"; return "z" } 1; say "y" } W'
    x
    
  2. or download this
    $ perl -E 'sub W { grep { say "x"; return "z" } 1; say "y" } say W'
    x
    z
    
  3. or download this
    $ perl -E 'sub W { grep { say "x" } 1; say "y" } W'
    x
    y
    

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://1207346]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others learning in the Monastery: (5)
As of 2024-04-19 17:23 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found