in reply to File won't dessapear.
Just two suggestions:
1. If on Unix, have you checked the directory permissions - you need write access to the directory as well as to the file. Could you have created the temp file originally as a different user?
2. Are you sure as ZZ pointed out that $path contain the full path of the file. unlink will only delete directories if run as root.
1. If on Unix, have you checked the directory permissions - you need write access to the directory as well as to the file. Could you have created the temp file originally as a different user?
2. Are you sure as ZZ pointed out that $path contain the full path of the file. unlink will only delete directories if run as root.
In Section
Seekers of Perl Wisdom