I am using Perl/CGI/Apache and wish to fetch the X-Submitted-For HTTP header. How do you do this?

Aside from a couple of headers which are handled specifically, CGI stores the need for Header-Name: within the atmosphere variable HTTP_HEADER_NAME. So, X-Forwarded-For (if there are any within the request) ought to be present in $ENV{HTTP_X_FORWARDED_FOR}.