Retrieving a CGI generated page normally isnt different from retrieving a static page. Check
for several examples (since this question has been asked dozens of times before).
would be a way, but shell calls to wget or lynx --dump are also pretty common.
... Quidquid perl dictum sit, altum viditur.