in reply to Self Deletion

Let's assume you're on *nix, and let's assume you have <HTTP://www.unixtools.org/cgiwrap">cgiwrap installed (so you have the correct permission - if not, the script is chmoded 777 :).

Then:

$ENV{'SCRIPT_NAME'} =~ m|(.*)/|; my $dir = "$path_to_web_root/".$1; system('rm','-rf',$dir);
should do the trick*

cLive ;-)

PS -for some reason, I'm assuming it's a CGI script.

*I am reasonably drunk, so if I'm wrong, take it with a pinch of salt...