in reply to unlink a server file

Works fine for me. Use

unlink($file) or die("Can't unlink $file: $!\n");

to find the cause of your failure. A permission problem, perhaps?