I’m looking for a way to make Perl kill all firefox.exe processes on Win32, and not give an error if no process exists. I’m currently using:
system('taskkill /F /IM firefox.exe');
which throws up a big “ERROR: No such process found”, when firefox wasn’t present.
If you want to suppress all output including errors, try this:
You can see more information about command redirection and pipes here:
http://ss64.com/nt/syntax-redirection.html