Recently, in the 9CBS CGI version, I saw that there is a Centuries who asked how to embed HTML in Perl. This is a problem that is often encountered in Perl Web development. Now it is written, I hope to help everyone.
Ask me now there is an HTML web code, to change it to the Perl program, if it is just simply add "#! ../ perl / bin / perl", and change the file suffix to .cgi Error prompts "You don't have readion to access /test/index.cgi on this server.". In other words: How do the HTML code in Perl named .cgi? Thank you. A answer sub html_html {print "content-type: text / html / n / n"; print << EOF; # here output htmleofexit;} Assessing CEOCIO. After adding, it is okay, but the picture "resource / top.gif" cannot be displayed, the picture path is definitely correct, such as: resource / top.gif Answer the relative path, it is best to make a installation file setup.cgi In your file: Require "setup.cgi"; then call this: This line in the setup.cgi file: $ gif= 'http: // Your URL / Resource '; # 图片' s URL path, pay attention to single quotes instead of double quotes. This should be available in a relative path.