#!/usr/bin/perl use warnings; use strict; use File::Find; $|++; my $path = '.'; finddepth (\&wanted,$path); sub wanted { return unless -d; #-d for dir ops -f for files or comment out for both return $File::Find::prune = 1 if $File::Find::name eq '.'; print "$_\n"; print "$File::Find::name\n"; } __END__