in reply to What am I doing wrong here?

The main thing is probably the URL "http://~zach3327/public_html/chapter12/c12case1b.html": ~zach3327 is probably not the hostname. Try removing the http:// and starting the URL with just /~zach3327/... instead (you could also get the script's location in different formats via CGI.pm's url function, and if you need further URL manipulation, see URI - Update: see my other post). It also seems that you've embedded hard newlines in the string as "Location:\n\t    ..." - I'd recommend not doing that, i.e. "print "Location: /~zach3327/...".

I also see a few other issues:

Edit: Fixed thinko.