#!/usr/bin/perl use strict; use warnings; my $dir = '/usr/lib/perl5/5.8.8/CGI'; @ARGV = $dir unless @ARGV; use File::Find; find sub { print $File::Find::name, -d && $dir, "\n" }, @ARGV;