Help for this page

Select Code to Download


  1. or download this
    sub a {
       sub x { print "I came from a\n"; }
    ...
    x();
    a(); x();
    b(); x();
    
  2. or download this
    I came from b
    I came from b
    I came from b
    
  3. or download this
    sub a {
        local(*x) = sub { "from a" };
    ...
    sub doit {
        print "I came ", x(), "\n";
    }