in reply to not parsing properly??

Your system statement passes the string rm index.html?C=S;O=D to the unix shell. Since the semicolon has special meaning to the shell (it is a command separator), the shell breaks your string up into 2 commands:
rm index.html?C=S O=D
Since you do not have a file named "index.html?C=S", you get the "No such file or directory" message.

Try to replace your system with unlink:

unlink $filename or die $!;
If that doesn't work, you may have to resort to some type of escaping heroics using backslashes or quotes.

Replies are listed 'Best First'.
Re^2: not parsing properly??
by wisemonkey (Novice) on Apr 17, 2011 at 23:49 UTC
    Awesome thanks a ton. That fixed it, Currently script is running. I'll let you know as its done deleting all junk :)
      yup cleaned and confirmed, thanks again :)