in reply to Traversing through a directory structure

If you're working on a UNIX system (and I suspect from your task and your code that you are), you might be better off using the find command to list all of your directories, then using a (simpler) Perl script to do your processing.

For instance, you could try something like this from the shell:
find /dsmpayroll -type d | perl -n saveinfo.pl

... where saveinfo.pl reads:
#!/usr/bin/perl -w use strict; my $output; $output .= $_ for ($_, qx/ls -l $_/, qx/lsac */); # Get output for fil +e # Print output to file s!/!.!g; # Generate suitable filename open FH, ">/home/mis/tstanley/Migrate/$_" or die $!; print FH $output;
No need to figure out how to pass a function reference (which dmorelli points out may be the culprit in your original script). More importantly, the find command allows you to specify many search parameters, something which may be harder to do programmatically with Perl.

Check the manpages for find (and perl, if you're unfamiliar with the -n switch).