The subdirectory message is being sent to STDERR by the 'md' command not Perl.
I found this in the Perl documentation with regards to what $res is being assigned,
The collected standard output of the command is returned; standard error is unaffected. In scalar context, it comes back as a single (potentially multi-line) string, or undef if the command failed.
In reply to Re: WHY error message is printed in STDOUT?
by Herkum
in thread WHy error message is printed in STDOUT?
by madtoperl
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |