in reply to Upload and Delete

The Perl function unlink can be used to delete files. Use of unlink will fail if your program doesn't have the necessary authority over the file(s) to be deleted.

Replies are listed 'Best First'.
Re: Re: Upload and Delete
by Anonymous Monk on Mar 06, 2002 at 09:31 UTC
    Ok, thanks, but unlik works in the machine that run the Perl CGI. The Perl CGI run in Unix Server.
      You should be able to use unlink on a PC, so there must be something else wrong. Without knowing anything about what you're doing, it's hard to say.

      Are you using die with $! to show you why the system couldn't perform the unlink? e.g.
      unlink $file or die "Can't delete $file, $!"

      If not, add that and see if it doesn't give you the help you need. If you reply to this thread again, you'll save a lot of time by explaining what you are doing in more detail and including some relevant code.