i have encountered a problem running the command exec() from a perl cgi. When i launch the script from the command line it works properly while, when i call the same script from apache (through a web client), i can't see the output of the exec() command on the browser.

The exec function executes a system command and never returns-- use system instead of exec if you want it to return. It fails and returns false only if the command does not exist and it is executed directly instead of via your system's