in reply to Deleting or unlinking a file
Always use strictures (use strict; use warnings;). Try it. It will help!