Just create your list variable in the main scope of your script, so it'll be in scope inside the sub:
my @list; find( \&wanted, '.'); say for @list; sub wanted { return unless -f; push @list, $File::Find::name; }
In reply to Re^5: Listing Files
by aaron_baugher
in thread Listing Files
by vchavan
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |