#!/usr/bin/perl -w

use File::Spec::Functions;

$dir = "/tmp";

opendir(DIR, $dir) or die("Cannot open $dir");

foreach $dir (readdir DIR) {
    next if $dir eq updir();
    next if $dir eq curdir();

    print "Verzeichnis gefunden: $dir\n";
}

closedir(DIR);
