in reply to delete a line

I'd recommend Dominus' wonderful Tie::File for line-based file manipulation needs, or perhaps the -i switch would be more appropriate (see. the perlrun manpage for more info).
HTH

_________
broquaint