in reply to Correct code for deleting old file?

That looks like you're trying to unlink $some_url, rather than unlink $some_file. I suspect unlink should probably be in getFile(). Please show the code for that subroutine.

-- Ken

Replies are listed 'Best First'.
Re^2: Correct code for deleting old file?
by markuswinter (Novice) on Jun 15, 2012 at 10:53 UTC

    <Homer Simpson moment>Doh!</Homer Simpson moment>

    You are right of course. So much for my perl skills :-P

    The code of the subroutine is posted above in answer to another reply.

    Thanks!