Thread Pfad eines Ordners auswählen (7 answers)
Opened by Gast at 2006-07-11 13:10

renee
 2006-07-12 13:14
#8316 #8316
User since
2003-08-04
14371 Artikel
ModeratorIn
[Homepage] [default_avatar]
Code: (dl )
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
#!/usr/bin/perl

use strict;
use warnings;
use File::Find;

print "Content-type: text/html\n\n";

my $startdir = '/path/to/startdirectory';
my @dirs;

find(\&find_dirs,$startdir);
print_select(\@dirs);

sub find_dirs{
push(@dirs,$File::Find::name) if(-d $File::Find::name);
}# find_dirs

sub print_select{
my ($dir_ref) = @_;
print "<select><option>".join('</option><option>', @$dir_ref).'</option></select>';
}
\n\n

<!--EDIT|renee|1152698673-->
OTRS-Erweiterungen (http://feature-addons.de/)
Frankfurt Perlmongers (http://frankfurt.pm/)
--

Unterlagen OTRS-Workshop 2012: http://otrs.perl-services.de/workshop.html
Perl-Entwicklung: http://perl-services.de/

View full thread Pfad eines Ordners auswählen