ONe thing -d is 'is a directory' -e is exists.  You might do both.  Test 
if it exists (output debug) test if its a dir (output debug) etc.  I often 
add debuging ls/dir commands to show me what the box is seeing at that 
point;
my $debug = 10;
if($options{local_retention} =~ m/yes/) {
     my $lspath = $options{local_store_path};
     print STDERR "Got local_retention, trying: $lspath\n"
        if $debug > 3; 
     print STDERR `dir $lspath`
        if $debug > 8;
      if(!(-e $lspath)) {
            print STDERR "$lspath doesn't exists, making\n"
              if $debug > 3; 
            my $path_created = &File::Path::mkpath($lspath);
            print STDERR "made $path_created\n"
              if $debug > 3; 
      } else {
            print STDERR "$lspath exists\n" 
              if $debug > 3;
            print STDERR "$lspath a dir\n" 
              if $debug > 3 and -d $lspath;
       }     # if ! -e $lspath
}            # if  options{local_retention}

perldoc File::Path says mkpath
"returns a list of all directories (including  intermediates, determined 
using the Unix '/' separator)  created."

a

Andy Bach, Sys. Mangler
Internet: [EMAIL PROTECTED] 
VOICE: (608) 261-5738  FAX 264-5030

" ... even if you're mediocre/decent at perl [the cmecf] code is pretty 
confusing in certain areas ..." CB
_______________________________________________
Perl-Win32-Admin mailing list
[EMAIL PROTECTED]
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs

Reply via email to