Clear questions and runnable code get the best and fastest answer |
|
PerlMonks |
comment on |
( [id://3333]=superdoc: print w/replies, xml ) | Need Help?? |
The answer is almost always: don't use system.
If your question is using mkdir as an example, then the answer is use backticks like:
If the command to be run will produce output on stdout as well as errors on stderr, then you'll be better off using one of the modules which will allow you to run a command and receive stderr and stdout separately, like IPC::Run, ... If you really meant mkdir specifically, why not use perl's mkdir, or File::Path's mkpath? You won't have to do any error-trapping; you can just ask perl what happened. In reply to Re^2: trapping system error
by thargas
|
|