469,310 Members | 2,750 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,310 developers. It's quick & easy.

Deleting a file

Can't seem to get this to delete the file, ive tried setting the permissions but it still won't delete.

Expand|Select|Wrap|Line Numbers
  1. my $fileName = 'c:\inetpub\wwwroot\guessingGame\guessingGame.csv'; 
  2. unlink($fileName);
Mar 13 '09 #1
1 1274
KevinADC
4,059 Expert 2GB
@chanshaw
Please reply to the threads you start.

Try this, see what $! returns:

Expand|Select|Wrap|Line Numbers
  1. my $fileName = 'c:\inetpub\wwwroot\guessingGame\guessingGame.csv'; 
  2. unlink($fileName) or die "Can't delete file $filename : $!";
There is nothing patently wrong with your usage so either its a wrong path or the file is not closed or some other issue.
Mar 13 '09 #2

Post your reply

Sign in to post your reply or Sign up for a free account.

Similar topics

13 posts views Thread by Bob Darlington | last post: by
4 posts views Thread by al havrilla | last post: by
2 posts views Thread by GMK | last post: by
2 posts views Thread by SiouxieQ | last post: by
5 posts views Thread by Sandeep Singh Sekhon | last post: by
3 posts views Thread by Kimera.Kimera | last post: by
13 posts views Thread by programming | last post: by
reply views Thread by suresh191 | last post: by
reply views Thread by harlem98 | last post: by
1 post views Thread by Geralt96 | last post: by
reply views Thread by harlem98 | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.