btw in any secure or semi-secure environment, you're likely to run into permission problems with the user id executing perl CGI not having access to shell or commands or parts of filesystem. you can use a utility of choice for sniffing file permission access errors and amend as minimally appropriate whilst still having the CGI produce results.
the hardest line to type correctly is: stty erase ^H