$|=1; # So it works in the Open Perl IDE

chdir "d:/temp" or die "Couldn't change dir: $!"; # goto the dir with the files
@files = glob "BAK/*"; # get the names of the files to delete
unlink @files; # delete them
rmdir "BAK" or die "Deletion of directory failed: $!"; # delete the directory
