Help for this page

Select Code to Download


  1. or download this
    my $f = sub { return 'a sub' };
    print "\$f is ${\$f->()}\n";
    ...
    __output__
    
    $f is a sub
    
  2. or download this
    my $f = sub { return 'a sub' };
    # list
    ...
    # save return
    my $ret = $f->();
    print "\$f is $ret\n";