Help for this page

Select Code to Download


  1. or download this
    my $dir = "directory";              # this dir exists
    my $no_dir = "no.such.directory";   # this one does not
    ...
    print "$dir is a directory" if ( -d $dir );
    print "$no_dir exists" if ( -e $no_dir );
    print "$no_dir is a directory" if ( -d $no_dir );
    
  2. or download this
    use File::Path;
    rmtree( [$name], 0, 0 );