Anonymous Monk has asked for the wisdom of the Perl Monks concerning the following question:
Any help will be appreciated.my $maid_dir = "C:/Documents and Settings/mydir/Desktop/current/rm_fil +es"; opendir my $dh, "$maid_dir"; # directory to search my @files = readdir $dh; foreach my $f (@files){ my $size = -s $f; print $size, "\n"; print Dumper($f); if($size < 1 ){ unlink("$size"); } }
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: using unlink to delete files
by davorg (Chancellor) on Jun 22, 2009 at 22:06 UTC | |
|
Re: using unlink to delete files
by Your Mother (Archbishop) on Jun 22, 2009 at 23:18 UTC | |
|
Re: using unlink to delete files
by Anonymous Monk on Jun 22, 2009 at 22:43 UTC | |
|
Re: using unlink to delete files
by moritz (Cardinal) on Jun 22, 2009 at 21:21 UTC | |
|
Re: using unlink to delete files
by scorpio17 (Canon) on Jun 23, 2009 at 13:51 UTC |