Leser: 1
|< 1 2 >| | 18 Einträge, 2 Seiten |
1
2
3
4
5
6
7
8
9
10
11
12
13
14
# ungetestet
use File::Find;
my @dirs;
find(\&wanted,"C:\\");
my $file = '/path/to/file';
open my $fh, '>', $file or die $!;
print $_,"\n" for @dirs;
close $fh;
sub wanted{
push @dirs,$File::Find::name if -d $File::Find::name;
}
1
2
3
4
5
6
7
8
9
10
11
12
use File::Find;
my @dirs;
find(\&wanted,"C:\\");
my $file = '/path/to/file';
open my $fh, '>', $file or die $!;
print $_,"\n" for @dirs;
close $fh;
sub wanted{
push @dirs,$File::Find::name if -d $File::Find::name;
}
1
2
3
4
my $file = '/path/to/file';
open my $fh, '>', $file or die $!;
print $_,"\n" for @dirs;
close $fh;
print $fh $_,"\n" for @dirs;
print $fh $_,"\n" for @dirs;
print $fh "$_\n" for @dirs;
|< 1 2 >| | 18 Einträge, 2 Seiten |