in reply to Re: Re: (golf) Recursively delete empty directories from a tree
in thread (golf) Recursively delete empty directories from a tree
didn't run for me, I needed to separate the rmdir with ;finddepth sub {(!-d or /^.{1,2}$/)||rmdir($_)},@ARGV;
or with a printuse File::Find; finddepth sub {(!-d or /^.{1,2}$/);rmdir},@ARGV;
use File::Find; finddepth sub {(!-d or /^.{1,2}$/);rmdir; warn $File::Find::name,$! if $! =~ /not empty/},@ARGV;
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Re: Re: Re: (golf) Recursively delete empty directories from a tree
by greenFox (Vicar) on Feb 19, 2004 at 23:54 UTC | |
by zentara (Cardinal) on Feb 20, 2004 at 16:53 UTC |