sub msg { $msg_num = @_[0]; $msg_txt = "$msg_num $msgs{$msg_num}"; print "HTTP/1.0 $msg_txt\n"; } #### %msgs = ("200", "OK", "400", "Bad Request", "403", "Forbidden", "404", "Not Found", "500", "Internal Server Error"); #### &msg(400); #### HTTP/1.0 400 Bad Request #### if ($proto ne "HTTP/1.0") { &msg(400); } #### HTTP/1.0 400