find(\&wanted, @dirs_to_search); sub wanted { /^.*\.svn\z/s && rmtree ($_); }