If $dir isn't ".", then this won't work. unlink($file) tries to delete $file from your current directory, not from whatever $dir is.
unlink("$dir/$file");
If you want to port to platforms that don't use "/" as the direcotry separator, I suggest lookin at how MakeMaker handles this.
In reply to Re: Code for DELETING NT FILES
by tye
in thread Code for DELETING NT FILES
by rauschy33
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |