Next Unix Command Internals 18

Current directory

        $X = "parent\n";
        if (fork() == 0) {   # I'm the child
          $X = "child\n";
        }
        print $X;
        parent
        child


Next Copyright © 2002 M. J. Dominus