in reply to exec, system, or backticks

I think backticks are better when you need to capture the output of the process. If you're throwing away that value, maybe system will be more appropiate.

Updated:

From perldoc -f system:

You can check all the failure possibilities by inspecti +ng $? like this: if ($? == -1) { print "failed to execute: $!\n"; } elsif ($? & 127) { printf "child died with signal %d, %s coredump\ +n", ($? & 127), ($? & 128) ? ’with’ : ’without +’; } else { printf "child exited with value %d\n", $? >> 8; }

I see you are not using the return value (system) nor the output (backtick). I recommend you to use system and allways check the return value of the process.

Replies are listed 'Best First'.
Re^2: exec, system, or backticks
by tc1364 (Beadle) on Oct 20, 2004 at 16:02 UTC
    Thank you for your input!