Beefy Boxes and Bandwidth Generously Provided by pair Networks
Syntactic Confectionery Delight
 
PerlMonks  

Re: RFC: Simulating Ruby's "yield" and "blocks" in Perl

by Jenda (Abbot)
on Apr 23, 2013 at 01:03 UTC ( #1030013=note: print w/replies, xml ) Need Help??

Help for this page

Select Code to Download


  1. or download this
    sub test (&){
      my $print = shift;
    ...
      $print->(2);
    }
    test { say "You are in the block $_[0]" };
    

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others lurking in the Monastery: (4)
As of 2022-08-17 19:15 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found

    Notices?