in reply to Save permissions on a directory tree
I think Perl might not be the first choice here. Personally, I'd use some standard unix utilities:
cd /directory ls -lR > knowledge [download]