Help for this page

Select Code to Download


  1. or download this
    #!/usr/bin/perl -w
    
    ...
    my $code = q{ open( my $fh, '<', 'foo.txt' ) or die("open failed: $!")
    + };
    my $sub = sub { eval($code) or die("error in eval(): $@"); };
    $sub->();
    
  2. or download this
    #!/usr/bin/perl -w
    
    ...
        $$sub_name = $sub;
        $do_this->();
    }