-f is the default behaviour. You are turning it off.
Change
perl -e 'use File::Path "rmtree"; rmtree("foo", 0, 1)'
to
perl -e 'use File::Path "rmtree"; rmtree("foo", 0, 0)'
or just
perl -e 'use File::Path "rmtree"; rmtree("foo")'
In reply to Re: concise perl rm -rf idiom that works?
by ikegami
in thread concise perl rm -rf idiom that works?
by thepler
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |