With the standard CGI model, where your web server forks off a process to run an external program, it's possible to do such a thing, but it seems really tricky and fragile. The web server doesn't necessarily know that it'll run a Perl program and the perl binary it launches almost definitely doesn't know that it would have subroutines already in memory somewhere. Even if it did, it would have to do a substantial amount of bookkeeping to bring that code in to the rest of the program.
Perhaps CGI::FastCGI would work more to your liking.
<code> <a> <b> <big> <blockquote> <br /> <dd> <dl> <dt> <em> <font> <h1> <h2> <h3> <h4> <h5> <h6> <hr /> <i> <li> <nbsp> <ol> <p> <small> <strike> <strong> <sub> <sup> <table> <td> <th> <tr> <tt> <u> <ul>