Carl Campbell wrote:
> $mode = 0777;
> mkdir ("C:\TEST1", $mode);
> mkdir ("C:\TEST1\FOLDER1", $mode);
> mkdir ("C:\TEST1\FOLDER2", $mode);
> mkdir ("C:\TEST1\FOLDER3", $mode);
> mkdir ("C:\TEST1\FOLDER4", $mode);
> mkdir ("C:\TEST1\FOLDER5", $mode);

This creates a six directories under drive C's current directory: TEST1 and
TEST1FOLDER1 to TEST1FOLDER5 (since "\F" eq "F"; escaping F returns an F).

If you had used lowercase, it would be even more fun; the directories would
be <tab>est1 and <tab>est1<formfeed>older1 to <tab>est1<formfeed>older5
(since "\f" is a formfeed character, also known as ^L or Ctrl-L or "\cL").

Moral of the story: in double-quoted strings, use double backslashes (e.g.
"C:\\TEST1\\FOLDER5") or, even better, forward slashes ("C:/test1/folder5"),
which work just fine for Perl system calls such as mkdir() or open().

Cheers,
Philip

---
You are currently subscribed to perl-win32-users as: [archive@jab.org]
To unsubscribe, forward this message to
         [EMAIL PROTECTED]
For non-automated Mailing List support, send email to  
         [EMAIL PROTECTED]

Reply via email to