Help for this page

Select Code to Download


  1. or download this
    my $output = qx(date);
    die("Unable to launch external process: $!\n")
       if not defined $output;
    die("The external process did not run successfully (error code $?)\n")
       if $?;
    
  2. or download this
    my $rv = system(date);
    die("Unable to launch external process: $!\n")
       if $rv == -1;
    die("The external process did not run successfully (error code $?)\n")
       if $?;