{"id":1021,"date":"2010-12-27T05:17:07","date_gmt":"2010-12-27T05:17:07","guid":{"rendered":"http:\/\/www.phpmind.com\/blog\/?p=1021"},"modified":"2010-12-27T06:49:44","modified_gmt":"2010-12-27T06:49:44","slug":"how-to-run-perl-in-mamp","status":"publish","type":"post","link":"https:\/\/www.phpmind.com\/blog\/2010\/12\/how-to-run-perl-in-mamp\/","title":{"rendered":"How to run perl in MAMP?"},"content":{"rendered":"<p><img loading=\"lazy\" decoding=\"async\" src=\"http:\/\/www.phpmind.com\/blog\/wp-content\/uploads\/2010\/12\/phpmind-perl.gif\" alt=\"\" title=\"phpmind-perl\" width=\"145\" height=\"75\" class=\"alignleft size-full wp-image-1022\" \/> If everything is configured properly, put a perl file in your cgi-bin folder, set permissions so that apache can execute it, and you are all set ready to go.\u2028<br \/>\nBasically, Perl suffers in this aspect just because it was first and that is the way CGIs were done. PHP came along and the default setting allowed PHP scripts to run from any directory. So this is a little trouble for php programmers.<\/p>\n<p>It took one hour for me to figure out how  to run perl in MAMP.<\/p>\n<p>Well here are some easy steps for you.<\/p>\n<p>The permissions for all of those files needs to be 755.\u2028<\/p>\n<pre lang=\"php\">\r\nGo to a  Application >> Utility >> and open Terminal.\u2028\r\n\u00a0 \u00a0 cd \/Applications\/MAMP\r\n\u00a0 \u00a0 chmod 755 cgi-bin\r\n\u00a0 \u00a0 cd cgi-bin\r\n\u00a0 \u00a0 find . -type f -exec chmod 755 \\{\\} \\;\r\n\r\n   Put all perl files in cgi-bin folder. \u2028\r\n  \/Applications\/MAMP\/cgi-bin\r\n\r\nRun your script \r\n\r\nhttp:\/\/localhost\/cgi-bin\/test.pl\r\n\r\nYou are done!\r\n\r\n<\/pre>\n","protected":false},"excerpt":{"rendered":"<p>If everything is configured properly, put a perl file in your cgi-bin folder, set permissions so that apache can execute it, and you are all set ready to go.\u2028 Basically, Perl suffers in this aspect just because it was first and that is the way CGIs were done. PHP came along and the default setting [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_exactmetrics_skip_tracking":false,"_exactmetrics_sitenote_active":false,"_exactmetrics_sitenote_note":"","_exactmetrics_sitenote_category":0,"footnotes":""},"categories":[35],"tags":[],"class_list":["post-1021","post","type-post","status-publish","format-standard","hentry","category-perl-mamp"],"_links":{"self":[{"href":"https:\/\/www.phpmind.com\/blog\/wp-json\/wp\/v2\/posts\/1021","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.phpmind.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.phpmind.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.phpmind.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.phpmind.com\/blog\/wp-json\/wp\/v2\/comments?post=1021"}],"version-history":[{"count":7,"href":"https:\/\/www.phpmind.com\/blog\/wp-json\/wp\/v2\/posts\/1021\/revisions"}],"predecessor-version":[{"id":1030,"href":"https:\/\/www.phpmind.com\/blog\/wp-json\/wp\/v2\/posts\/1021\/revisions\/1030"}],"wp:attachment":[{"href":"https:\/\/www.phpmind.com\/blog\/wp-json\/wp\/v2\/media?parent=1021"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.phpmind.com\/blog\/wp-json\/wp\/v2\/categories?post=1021"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.phpmind.com\/blog\/wp-json\/wp\/v2\/tags?post=1021"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}