Hi Patrick,

sorry I meant to say,
if I try to make a path
mkdir won't allow me to
do that.

Like for example,

$directory = "F:\this\is\a\test";

mkdir($directory,0777)
won't work.

Is there a make path function
in PERL? I cannot seem to find one.

thanks,

John

-----Original Message-----
From: Patrick J. LoPresti [mailto:[EMAIL PROTECTED]
Sent: Thursday, September 25, 2003 9:26 AM
To: John Deretich
Cc: 'SUMNER, Peter'; Perl-Win32-Admin-Request (E-mail)
Subject: Re: s/ / / operator


To get the file name, use the File::Spec or File::Basename module.
They are more robust, portable, and readable than calling "split" by
hand.

Always invoke mkdir, or any similar Perl operator, like this:

  mkdir $directory, 0777
      or die "Unable to mkdir $directory: $^E";

That will tell you exactly what it tried to do and why it failed.

 - Pat


John Deretich <[EMAIL PROTECTED]> writes:

> Thanks Peter,
> 
> this works, but now PERL won't
> allow me to make the directory
> to copy the files in.
> 
> I am using mkdir("$directory",0777).
> 
> Any idea why?
> 
> thanks,
> 
> John
_______________________________________________
Perl-Win32-Admin mailing list
[EMAIL PROTECTED]
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs

Reply via email to