Help for this page

Select Code to Download


  1. or download this
    sub Foo {print "Foo!\n"}         # named subroutine / non-closure
    my $foo= sub { print "Bar!\n"};  # anonymous / non-closure
    ...
    
    takes_a_callback($_) foreach \&Foo,$foo,$bar,\&FooBar;