Just use the block form of if otherwise the %seen hash is being checked twice, and only the first statement would pass.
find(sub { if (-d $File::Find::name && !$seen{$_}++) { push @folders, "$_" ; print $FOLDERS "$_\n"; } }, $cwd);
In reply to Re^5: Cont:match failing
by wind
in thread Cont:match failing
by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |