{"id":61,"date":"2008-03-25T19:59:33","date_gmt":"2008-03-26T03:59:33","guid":{"rendered":"http:\/\/staging.www.zenutech.com\/kb\/article\/sample-perl-script-for-testing\/"},"modified":"2011-05-17T11:01:35","modified_gmt":"2011-05-17T19:01:35","slug":"sample-perl-script-for-testing","status":"publish","type":"post","link":"https:\/\/www.zenutech.com\/kb\/article\/sample-perl-script-for-testing\/","title":{"rendered":"Sample Perl script for testing"},"content":{"rendered":"<p>The following Perl script is bug free and can be used for testing if Perl is working on your account.<\/p>\n<pre>#!\/usr\/bin\/perl\r\n\r\n# hello.pl -- my first perl script!\r\n\r\nprint \"Content-type: text\/html\\n\\n\";\r\n\r\nprint &lt;&lt;\"EOF\";\r\n&lt;HTML&gt;\r\n\r\n&lt;HEAD&gt;\r\n&lt;TITLE&gt;Hello, world!&lt;\/TITLE&gt;\r\n&lt;\/HEAD&gt;\r\n\r\n&lt;BODY&gt;\r\n&lt;H1&gt;Hello, world!&lt;\/H1&gt;\r\n&lt;\/BODY&gt;\r\n\r\n&lt;\/HTML&gt;\r\nEOF\r\n&nbsp;\r\n<\/pre>\n<ol>\n<li>Create a new file and copy the above script into it<\/li>\n<li>Save it as &#8220;hello.cgi&#8221;  or &#8220;hello.pl&#8221;<\/li>\n<li>With your <a href=\"\/kb\/article\/recommended-ftp-software\/\">FTP program<\/a>&#8230;\n<ol>\n<li>Upload it to your &#8220;public_html&#8221; folder<\/li>\n<li>Change the modification privileges (chmod) to 755<\/li>\n<\/ol>\n<\/li>\n<li>Try access it in your web browser (e.g. http:\/\/yourname.zenutech.com\/hello.cgi)<\/li>\n<\/ol>\n","protected":false},"excerpt":{"rendered":"<p>A sample Perl script for testing on your account.<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[10],"tags":[86,58,87,77,89,294],"class_list":["post-61","post","type-post","status-publish","format-standard","hentry","category-web-development","tag-cgi","tag-perl","tag-programming","tag-scripting","tag-testing","tag-web-development"],"_links":{"self":[{"href":"https:\/\/www.zenutech.com\/kb\/wp-json\/wp\/v2\/posts\/61","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.zenutech.com\/kb\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.zenutech.com\/kb\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.zenutech.com\/kb\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.zenutech.com\/kb\/wp-json\/wp\/v2\/comments?post=61"}],"version-history":[{"count":5,"href":"https:\/\/www.zenutech.com\/kb\/wp-json\/wp\/v2\/posts\/61\/revisions"}],"predecessor-version":[{"id":442,"href":"https:\/\/www.zenutech.com\/kb\/wp-json\/wp\/v2\/posts\/61\/revisions\/442"}],"wp:attachment":[{"href":"https:\/\/www.zenutech.com\/kb\/wp-json\/wp\/v2\/media?parent=61"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.zenutech.com\/kb\/wp-json\/wp\/v2\/categories?post=61"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.zenutech.com\/kb\/wp-json\/wp\/v2\/tags?post=61"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}