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 $?; #### 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 $?;