#!/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 "'; }