#! /usr/bin/env perl use strict; use warnings; use File::Find; my $dir = './testdir'; my @files; find(\&get_dir,$dir); for my $file(@files){ tue_was_mit_datei($file); } sub get_dir{ push(@files,$File::Find::name) if(-f $File::Find::name); }# get_dir