#!/usr/bin/perl use warnings; use strict; use File::Find; use Cwd qw(abs_path); sub w { -d && print $File::Find::name,$/ } File::Find::find( {wanted=>\&w}, abs_path($_)) for @ARGV;