use strict; use File::Find; use Cwd; my $startDir=getcwd; find(sub {printf "%s\n", substr((split($startDir,$File::Find::name))[1],1) if ($File::Find::name ne $startDir);}, $startDir);