There's probably a better way of doing it, but this should work.#!/usr/local/bin/perl -w use strict; use File::Find; my $dir = "/foo/bar"; # the directory you want removed sub remove { if (-d $_) { rmdir $File::Find::name; } else { unlink $File::Find::name; } } finddepth(\&remove, $dir); rmdir $dir;
In reply to Re: How can I remove a Dir?
by btrott
in thread How can I remove a Dir?
by Delfer
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |