Why open and close $out every time?
#!/usr/bin/env perl use Modern::Perl; use File::Find; # $out is used within w(): open my $out, '>>', 'list' or die $!; sub w { if( -d $_ ){ print $out "$_\n"; } } File::Find::find(\&w, '.');
In reply to Re^4: listing all subdirectories of directory into file
by jdrago999
in thread listing all subdirectories of directory into file
by tevolo
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |