Jump to content

Check out our Community Blogs

Register and join over 40,000 other developers!

Recent Status Updates

View All Updates

- - - - -

Get PERL running on server

hello world

  • Please log in to reply
2 replies to this topic

#1 11684


    CC Lurker

  • Just Joined
  • Pip
  • 1 posts

Posted 08 January 2012 - 09:00 AM

Hello everyone!

I wanted to use PERL on my server, but my server doesn't recognize PERL.
I'm new to PERL (but I do know PHP), so please keep it simple...
Say I've written a simple script, named script.pl:

use warnings;
use strict;

my $hello = "Hello world!";

print $hello;


Yes, it's not the code I want to get running, but that's not the problem.
The problem is, the output is not "Hello world!", but the code itself...
I'm not the owner of the server, I only have acces to one single directory.

How can I configure my directory that it will execute my PERL code server side?
  • 0

#2 WingedPanther73


    A spammer's worst nightmare

  • Moderator
  • 17757 posts
  • Location:Upstate, South Carolina
  • Programming Language:C, C++, PL/SQL, Delphi/Object Pascal, Pascal, Transact-SQL, Others
  • Learning:Java, C#, PHP, JavaScript, Lisp, Fortran, Haskell, Others

Posted 08 January 2012 - 01:33 PM

Have you installed perl on your server? What OS is your server running? How did you try to execute the above program?
  • 0

Programming is a branch of mathematics.
My CodeCall Blog | My Personal Blog

My MineCraft server site: http://banishedwings.enjin.com/

#3 Alexander



  • Moderator
  • 3963 posts
  • Location:Vancouver, Eh! Cleverness: 200
  • Programming Language:C, C++, PHP, Assembly

Posted 08 January 2012 - 05:38 PM

If you are running on a shared hosting panel, there usually are options regarding perl/ruby/etc.

Regardless, the common setup for most servers that support such scripts is to create a folder name cgi-bin in root and run it there (foo.com/cgi-bin/hello.pl). You will have to set up specific permissions (you'd have to look them up) in ftp or else you will get a blank screen and 500 server error.
  • 0

All new problems require investigation, and so if errors are problems, try to learn as much as you can and report back.

Also tagged with one or more of these keywords: hello world

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download