I would recommend 'flock' the file so that that the second process can detect the difference between the first process still runnning (ie second process can see the file but not get a flock on in) and the first process dying (ie file still exists but flock can be obtained).
places to looks for starters are :-
-
perldoc -f flock
-
perldoc perlopentut
UnderMine