Help for this page

Select Code to Download


  1. or download this
    # /tmp/child-child.pl
    print "I'm exec'd: $$\n";
    
  2. or download this
    #!/usr/bin/perl
    
    ...
        print "I'm child ($0): $$\n";
        exec $^X, '/tmp/child-child.pl';
    }
    
  3. or download this
    $ perl /tmp/main.pl
    I'm parent (/tmp/main.pl): 12499
    I'm child (/tmp/main.pl): 12500
    I'm exec'd (/tmp/child-child.pl): 12500