May 26, 2001, 6:37 AM
Post #4 of 6
Re: Delete file without file-end ?
[In reply to]
if unlink doesn't remove the file, there must be a reason for it, and I guess unlink will fail. So try the following:
This code either succeeds and prints nothing, or fails and prints 'cannot remove UserName:' plus the reason why the file could not be removed. Perhaps this helps you more than guessing.
$file = 'UserName';
unlink $file or die "cannot remove $file: $!\n";