#!C:\Perl\bin\perl.exe print "Content-type: text/html\n\n"; print "

Hello

\n"; print "\n"; print "TEST\n"; print "\n"; &getmychoices; print "\n"; print "\n"; print "\n"; print "\n"; print "\n"; print "\n"; print "\n"; print "\n"; print "
Select Stadt
Select Daten
\n"; print "\n"; print "\n"; sub getchoices { @back = ""; pop(@back); $on = 0; for(@mychoices) { if ($_ =~ /<\#$_[0]>/) { $on = 0; } if ($on == 1) { push(@back,$_); } if ($_ =~ /<$_[0]>/) { $on = 1; } } for (@back) { $_ =~ s/[\n]//; } return @back; } sub getmychoices { $self_name = substr($0,rindex($0,"\\")+1); $self_path = substr($0,0,rindex($0,"\\")+1); chdir("/data"); open(ALT,") { push(@choices,$_); } close(ALT); $on = 0; for(@choices) { if ($_ =~ /end choices.+$self_name/) {$on = 0;} if ($on == 1) { push(@mychoices,$_); } if ($_ =~ /start choices.+$self_name/) {$on = 1;} } }