the precise answer to your question is that hello.pl must be placed in the directory cgi-bin.
No, that's a common configuration, but not universal, on my system this is called "cgi" not "cgi-bin". The precise answer is the one you get after reading the documentation for your webserver.
Typically this will be found in the public_html directory, but is sometimes not so you may have to look around for it
On my system 'public_html' is 'pages', and 'cgi' is a sibling, not a child. You shouldn't have to "look around for it" though, the aforementioned documentation should tell you.
You also may need to change the permissions on the file to 755
Hopefully the system will be set up so that world doesn't need access and you can limit execute permission to the group.
(normally this can be done using you ftp client)
Although hopefully you are using sftp, rsync over ssh, or some other means of transfering files that doesn't result in passwords being sent in clear text.
and if you are viewing from a browser an html header print "Content-type: text/html\n\n"; before your print 'hello world'; statement will probably be necessary.
Would it qualify as a CGI script if it didn't output a Content-type header?
Either way, printing out the content-type directly instead of using a module (such as CGI.pm) probably isn't the way to go.
Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
Read Where should I post X? if you're not absolutely sure you're posting in the right place.
Please read these before you post! —
Posts may use any of the Perl Monks Approved HTML tags:
Outside of code tags, you may need to use entities for some characters:
- a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
Link using PerlMonks shortcuts! What shortcuts can I use for linking?
See Writeup Formatting Tips and other pages linked from there for more info.
| & || & |
| < || < |
| > || > |
| [ || [ |
| ] || ] ||