#!/opt/perl5/bin/perl -w use strict; use File::Find; ## I'm writing the file listings in this directory my $WriteDirectory="/home/mis/tstanley/Migrate"; ## This is the directory I want to traverse through my $TraverseDirectory="/dsmpayroll"; finddepth(&perms, $TraverseDirectory); sub perms{ my $pwd=`pwd`; # Get the directory I'm in my $file=$pwd; $file=~s/\//\./g; # Change the "/" into "." my $perms=`ls -l`; my $acl=`lsacl *`; open FH, ">$WriteDirectory/$file"||die"Can't open $file: $!\n"; print FH "$pwd"; print FH "$perms"; print FH "$acl"; close FH; }