in reply to Re: Re: Re: freaky mkdir problem
in thread freaky mkdir problem

output of the script:
mkdir /app/docs/intranet/Jupiter Media Metrix/mmf/1999/0 mkdir /app/docs/intranet/Jupiter Media Metrix/mmf/1999/1 mkdir /app/docs/intranet/Jupiter Media Metrix/mmf/1999/2 mkdir /app/docs/intranet/Jupiter Media Metrix/mmf/1999/3 mkdir /app/docs/intranet/Jupiter Media Metrix/mmf/1999/4 mkdir /app/docs/intranet/Jupiter Media Metrix/mmf/1999/5 mkdir /app/docs/intranet/Jupiter Media Metrix/mmf/1999/6 mkdir /app/docs/intranet/Jupiter Media Metrix/mmf/1999/7 mkdir /app/docs/intranet/Jupiter Media Metrix/mmf/1999/8 mkdir /app/docs/intranet/Jupiter Media Metrix/mmf/1999/9 mkdir /app/docs/intranet/Jupiter Media Metrix/mmf/1999/10 mkdir /app/docs/intranet/Jupiter Media Metrix/mmf/1999/10: File exists + at throw.pl line 8
the spaces in the directory have no effect. I've tried with non-spaced dir paths... same thing.

and the file 10 is created. strings was a great idea... here's it's output:
legal.html images 1998 1999 2000 2001 index.html Media: No such file or directory
those are all directories or files involved in the copying (from the non-test script!). no idea how that info is getting into the test script's output.

I'm going to go lie down now for a bit... :)

Replies are listed 'Best First'.
Re: output of test script
by dws (Chancellor) on Apr 27, 2001 at 02:16 UTC
    You might be able to narrow this further, but testing for the existence of the errant file prior to each step. Try the equivalent of:
    use File::Path; foreach my $n ( 0 .. 12 ) { print "/blah/10 exists prior to step $n\n" if -e "/blah/10"; mkpath("/blah/$n", 1, 0755) or die "$n: $!"; }
      tried that... nothing there before the mkdir call :(
        nothing there before the mkdir call :(

        We know the file is there before the mkpath/mkdir call for creating file "10". If that -e test doesn't find it right before that call mkpath(), that narrows the amount of code you'll have to inspect.

        Or, now might be a good time to learn the Perl debugger.