#!/usr/bin/perl use CGI qw(:standard); $name=$ENV{'REMOTE_USER'}; $dir="/Library/WebServer/Documents/$name"; chdir($dir) or die "$!huhu"; opendir (DIR, ".") or die "$!"; @folders = grep {/ome/} readdir DIR; $c=0; foreach $folder (@folders) { $c++; } if ($c==0) { print header; print start_html('no data'), h1('keine Daten vorhanden!'), hr; } else { print header; print start_html('Test'), h1('test'), start_form( -name => 'main_form', -method => 'POST', -enctype => &CGI::URL_ENCODED, -action => '/cgi-bin/link.cgi', ), p, "Ordner auswaehlen :", p, popup_menu('ordnermenu', [@folders]), p, submit , end_form, hr; if (param()) { print em(join(", ",param('ordnermenu'))), , hr; } print end_html; }