#!/usr/bin/perl use File::Find; finddepth sub { return unless -d; rmdir($_); }, @ARGV;