Help for this page

Select Code to Download


  1. or download this
    if (fork == 0) {
     # create a subprocess
    ...
     exec("/path/to/program","some","program","arguments");
     # run the program
    }
    
  2. or download this
    open my $shell, "|/bin/sh" || die "$!\n";
    print $shell "export var=value\n";
    ...
    print $shell "some complicated shell command # ;(){:|:&};:\n";
    print $shell "/run/the/program --with-args\n";
    
  3. or download this
    system <<"END";
    export var=value
    ...
    some() {shell commands}
    /run/some/program
    END