Help for this page

Select Code to Download


  1. or download this
    sub newprint {
        my $x = shift;
        return sub { my $y = shift; print "$x, $y\n"; };
    ...
    
    &$h("world");
    &$g("earthlings");
    
  2. or download this
    sub make_closures {
        my $j = 0;
        my @closures;
    ...
    foreach my $sub (&make_closures) {
        &$sub;
    }
    
  3. or download this
    7
    7
    7
    7
    7
    7