Help for this page
for my $file (@files) { # Perl will exit the loop when the array has been processed }
use File::Path 'remove_tree'; ... unlink($file) if -f $file; remove_tree($file) if -d $file; }