Sure, that's the whole purpose of the
CGI module (and the various modules that inherit from CGI). As long as your C++ code can interact appropriately, there's no practical limit to what Perl can do for you... that's why Perl is known as a glue language.
Of course, it couldn't hurt if you could be a bit more descriptive of your particular scenario and/or C++ code (not the code itself, just its purpose). Nevertheless, there is a glutton of good resources for Perl/CGI programming online and in print. Check the
Reviews section of PerlMonks for detailed suggestions.
-fuzzyping