Help for this page

Select Code to Download


  1. or download this
    ~/perl/monks$ cat foo.txt
    sub{"fish $_[0]"};
    
  2. or download this
    $foo_from_file = do "foo.txt";
    foo("This is test 1\n", qr/test (.*)/, $foo_from_file);
    ...
    sub foo { (my $text = $_[0]) =~ s/$_[1]/$_[2]->($1)/e;
              print $text; }