in reply to trapping system error

The error message you're talking about is print to the standard error stream, you can get it with
my $result = qx/ $command 2>&1 /

But in this case it's probably much easier to use the mkpath function from File::Path (it's a core module).

Perl 6 - links to (nearly) everything that is Perl 6.