|( #3333=superdoc: print w/replies, xml )||Need Help??|
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:
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:
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.
Evil is good, for without it, Good would have no value
In reply to Re: PERL-CGI on shared unix server