#!/usr/bin/perl #-#############################################        use strict;    use warnings;    use Data::Dumper;    my $root_dir = 'AbsoluterPfadZumVerzeichnis';        print "Content-type: text/plain\n\n";    print Dumper get_tree(\$root_dir);          print "\n\nRuntime: ", ((times())[0] + (times())[1]), " Sec."; #-############################################# # Sub: Create a Tree of Directories and Files #-############################################# sub get_tree {    my ($root, $dir) = @_;    my ($path, $tree);    local $_;        $$root =~ s/\\/\//g;        $dir ? ($path = "$$dir/$$root") : ($path = $$root);        chdir $$root;    $tree->{$_} = -d($_) ? get_tree(\$_, \$path) : $path foreach <*>;    chdir '..';        return $tree; } #-#############################################