I am trying to create a directory using Perl. But this call fails. However when I try to create the same directory structure in shell prompt, it works fine. Could someone please let me know why I am not able to create the directory in the directory structure? Example:
$absolutepath = "/localdatafs1/Domino/mail\abhy.nsf/Sent/Metadata";
print $absolutepath."\n";
mkdir "$absolutepath" or die $!;
In this example, localdatafs1
, Domino
, mail\abhy.nsf
, and Sent
are directories that already exist. I want to create a directory called metadata
in the directory structure /localdatafs1/Domino/mail\abhy.nsf/Sent/Metadata
using Perl. This mkdir call fails.
If I execute the command
mkdir /localdatafs1/Domino/mail\abhy.nsf/Sent/Metadata
in shell prompt, the directory gets created successfully.
Why I am unable to create the directory in Perl using the above path?