> -----Original Message----- > From: Stuart Clark [mailto:[EMAIL PROTECTED]] > Sent: Thursday, February 14, 2002 10:23 PM > To: perllist > Subject: windows paths > > > Hi all, > > I am putting together a script on windows. > > It uses filehandles. > > The problem is that for some reason it dosen't like the path > and won't create the folders and/or file. > > Regards > Stuart Clark > > > > > $OutFile = "c:\\invoices\\current\\sales"; > > open (OUTSALES,">$OutFile") || die "could not create $OutFile"; > > ##Blah Blah rest of script## > > > > > The error is : could not create c:\invoices\current\sales
The directory c:\invoices\current must exist. open() does not create directories. You need to use mkdir() (or mkpath() from the File::Path module) to create directories. -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]