Greetings, rahu_6697, and welcome to Perl(monks). :-)

Your question is somewhat vague, as to exact needs. But then again, Perl is new to you. So you get a pass this time. ;-)

If I had to guess; I'd say you're looking to discover how to run/execute Perl scripts on your hosted web/internet account, and how to print (produce) Perl/CGI driven web pages. That's a pretty large topic to cover in a single reply on Perl Monks. But using your provided example in the OP; I might suggest using the feature/say . It's a bit like Heredoc ( Here Document ). Here's my version using Feature say:

#!/usr/local/bin/perl -w use strict; use feature qw(say); print "content-type:text/html; charset=utf-8\n\n"; say qq~<!DOCTYPE html> <html lang="en"><head> <title>Hello, world!</title> </head><body> <h1>Hello, world!</h1> </body></html>~;
As you can see, it's quite a bit simpler. While I'd have generally dumped all the commonly used stuff into a sub, of even made, or used an existing module that already provided that. All of that strays from your question. So I'll refrain from digression. :-)

Secondly; you'll need to know where your hosing provider puts Perl for it's users. So you can use the right "shebang, or just "bang". That refers to the first line:#!/usr/local/bin/perl . Generally speaking, and as you noted you're on a *NIX platform. Your choices are either in /usr/bin/perl , or /usr/local/bin/perl. You can best determine that by way of which , or whereis . A couple of *NIX commands that tell you -- if you haven't already guessed; where stuff is. :-). So here's an example session:

# which perl /usr/local/bin/perl
or
# whereis perl perl: /usr/local/bin/perl /usr/local/lib/perl5/5.26/perl/man/man1/perl +.1.gz /usr/src/contrib/file/magic/Magdir/perl
As you can see, the output is different; the command whereis being quite a bit more informative. :-)

Lastly. You'll need/want to know where your hosting provider allows you to execute Perl scripts. This information should have been provided in the TOS (Terms of Service) you were required to agree to, when you signed up. Or it might also be in a FAQ (Frequently Asked Questions) they have on their site.

Well, I think that probably covers it.
HTH

--Chris

Evil is good, for without it, Good would have no value
¡λɐp ʇɑəɹ⅁ ɐ əʌɐɥ puɐ ʻꜱdləɥ ꜱᴉɥʇ ədoH


In reply to Re: PERL-CGI on shared unix server by taint
in thread PERL-CGI on shared unix server by rahu_6697

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • 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:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, 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, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.