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

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

by Jenda (Abbot)
on Apr 23, 2013 at 01:03 UTC ( [id://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?Last hourOther CB clients
Other Users?
Others making s'mores by the fire in the courtyard of the Monastery: (3)
As of 2024-04-25 21:07 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found