in reply to Re: File APPEND/OVERWRITE
in thread File APPEND/OVERWRITE
I tried the "or die" and the files all seem to be opening fine...(no death notices.. :-)
I am wondering about something...earlier in my code, I have a line of code to do a "mkdir", which I assumed would act the same as if I was doing it by hand...i.e. if a mkdir is entered on a subdirectory that already exists, it will just go in with life...:
foreach (@text) { $first = substr($_,0,11); mkdir "$first"; print "Copying $_ to $first.\n"; copy($_,"$first/$_"); unlink $_; }
I am wondering if that "mkdir" is actually re-creating the sub-directories, which if so I guess would wipe out anything that was in there previously?
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^3: File APPEND/OVERWRITE
by choroba (Cardinal) on Feb 09, 2012 at 22:39 UTC |