#!/usr/bin/perl use File::Find; finddepth sub { return if (! -d) or ($_ eq '.'|'..'); rmdir($_)}, @ARGV;