7 Einträge, 1 Seite |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22
sub callback_readdir { my ($folder, $proc) = @_; if(opendir(DIR, $folder)) { while(defined(my $file = readdir(DIR))) { next if $file =~ /^\.\.?$/; next if -f "$folder/$file"; $proc->("$folder/$file"); } closedir(DIR); } } ... callback_readdir($path, \&rmtree);
1
2
3
4
5
6
7
8
sub callback_readdir
{
my $folder = shift;
my $proc = shift;
die "Falsche Anzahl Parameter!" unless defined $folder and defined $proc;
die "Folder muss Referenz sein!" unless ref $folder;
7 Einträge, 1 Seite |