#!/usr/bin/perl use strict; use warnings; use File::Util; my $fu = File::Util->new(); my $dir = '/usr/bin/'; for my $file ($fu->list_dir($dir, qw(--files-only --recurse))) { my $fileName = $fu->atomize_path($file); #my ($fileName) = ($file) =~ m/\/([^\/]+$)/; # so geht's! print "$fileName\n"; }