#!sdh use strict; use warnings; my @f; my $path = $SDH::conf{doc_root} . $SDH::req->{uri}{path}; # remove file at end of path $path =~ s/[^\/]*$//; opendir DIR, $path; for (readdir DIR) { $_ .= '/' if -d "$path/$_"; push @f, $_ unless ($_ =~ /^\./); } closedir DIR; for (sort @f) { $SDH::res->body()->body(<< "EOT");
  • $_
  • EOT } 'OK';