Help for this page

Select Code to Download


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