in reply to Re: trapping system error
in thread trapping system error
my $output = `mkdir -p /what/ever 2>&1`;
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.
|
|---|