in reply to CGI and System

You should probably be using system instead of exec. Remember that exec actually converts the currently running process into the given command, which might not work as well in a http-process environment.
open(X10, "$command|"); print join('', <X10>); close(X10); # Or print `$command`
Unless you are getting an error, in which case you may want to use CGI::Carp.