Have you looked at what $! contains? Also, are the files still held open?
for my $file (@files) { unlink $file or warn "Couldn't remove '$file': $!"; };
Maybe the path to these files is not valid anymore because you changed the current directory?
Also see File::Temp for creating and managing tempfiles.
In reply to Re: delete file
by Corion
in thread delete file
by persianswallow
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |