Well, not that this has anything to do with Perl, but the usual method for doing this is to use a script on the server that redirects to the link target. Instead of sending people to http://example.org, you send them to http://example.com/link.cgi?url=http://example.org where the link.cgi takes note of the click and then sends a redirect to the given target.
Makeshifts last the longest.