My guess is that the user your web-server is running as (nobody or www-data, most likely) doesn't have the proper permissions to do anything to your test directory. If you chmod 777 it from your command line, then the script ought to work from a browser.
Note, perl itself has a rmdir command, although you'd have to clear out the directory first (using File::Find or something.)
Huh? I thought you said the script ran fine from the command line, therefore I would hope that you somehow have permissions to play around with the test directory.
Nevertheless, a second thing you might check is to make sure that rm is in the script's path. Better yet, use a full path in your system call.
Have you checked the server's error log? What (if anything) does it say?
In reply to Re: Why aren't system() calls working?
by eg
in thread Why aren't system() calls working?
by hotyopa
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |