in reply to Re: Re: Re: (golf) Recursively delete empty directories from a tree
in thread (golf) Recursively delete empty directories from a tree
finddepth sub {(!-d or /^.{1,2}$/);rmdir},@ARGV;
That makes the test a seperate statement from the action (rmdir). So the test is doing nothing and you are running rmdir on everything, which fails silently for files and non empty directories. Change rmdir to print to see it, thats how I tested my version.
No idea why my version won't work for you it runs OK for me :)
--
Do not seek to follow in the footsteps of the wise. Seek what they sought. -Basho
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Re: Re: Re: Re: (golf) Recursively delete empty directories from a tree
by zentara (Cardinal) on Feb 20, 2004 at 16:53 UTC |