I'm using File::Path's mkpath() function in a script run by Apache on Mac OS X 10.3 and Perl 5.8.1. It works fine when only creating a single directory, but as soon as it tries to create more than one directory level, it fails. Below is the relevant code and error. Can anyone see anything wrong, or have others seen this before?
my $full_path = $base_path.'/'.$new_path; unless (-e $full_path) { eval{mkpath($full_path)}; if ($@) { warn "Couldn't create $full_path: $@";} } [Fri Jan 13 12:15:51 2006] [error] [client 127.0.0.1] Couldn't create /opt/apache/sites/newsdesk/htdocs/media/8/2/7: mkdir /opt/apache/sites/newsdesk/htdocs/media/8/2/7: No such file or directory at /opt/newsdesk/app/lib/perl/News/Audio.pm line 60 Thanks, Andrew