I'm still working with baby perl but this code will display
all of the contents of a directory and prompt you with a yes
or no to delete the entire directory and it's contents.
This code works on perl 5.6.1 on a win32 system. Have fun!
#!/usr/bin/perl-w
use strict;
use win32;
my $dir = "U:\\foo\\bar\\perl";
system ("dir $dir");
system ("del $dir");
# here the /s includes subtrees and /q supresses the prompt
# uncomment this and you won't get the prompt!
# system ("del /s /q $dir");
system ("rmdir $dir");
|