in reply to Delete txt file in a previous file

Two suggestions: use strict; and use or die ... rather than || die

Also, how is this supposed to work? Files generally can't be deleted twice.

unlink("$3"); if (unlink($3) == 0)

Replies are listed 'Best First'.
Re^2: Delete txt file in a previous file
by stavros (Novice) on Aug 10, 2011 at 19:23 UTC

    Thanks for your reply.

    now i take that

    s ../Results/YAL001C.txt

    to YAL001C.txt

    File was not deleted.

    and i still can't delete the file that exist on ...htdocs\results.

    Also when i delete it manually my code doesn't create it automated.I have to create it in order to write my code the word "test" in it.