Beefy Boxes and Bandwidth Generously Provided by pair Networks
Just another Perl shrine
 
PerlMonks  

Re^2: Functional Programming & method rewriting

by SpanishInquisition (Pilgrim)
on Oct 28, 2004 at 22:36 UTC ( [id://403538] : note . print w/replies, xml ) Need Help??

Help for this page

Select Code to Download


  1. or download this
    my $hi_mom = prefix_later(
       sub { my $f = shift(); print "got: $f\n"; },
    ...
    );
    
    $hi_mom->("nerp") for (1..3);
    
  2. or download this
    got: nerp
    this was unneccessary:
    got: nerp
    this was unneccessary:
    got: nerp