What happens if you write that as:
if (-e "data/remove.txt") {
unlink "data/remove.txt" or die "unable to delete $!";
}
Are you sure you are using the filehandle >>? That's a pretty weird name for a filehandle. Or do you mean that you are using the append mode when opening a file? If so, why use append if the file isn't supposed to be there in the first place? It's not wrong (although I'm not sure if opening of a non-existing file using append mode actually works on all platforms), but people usually open a non-existing file in write only mode.