Jump to content

Get PERL running on server

- - - - -

  • Please log in to reply
2 replies to this topic

#1
11684

11684

    Newbie

  • Members
  • Pip
  • 1 posts
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:

[CODE]
#!/usr/bin/perl
use warnings;
use strict;

my $hello = "Hello world!";

print $hello;

[CODE]

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?
Thanks.

#2
WingedPanther

WingedPanther

    A spammer's worst nightmare

  • Moderators
  • 16,831 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
Have you installed perl on your server? What OS is your server running? How did you try to execute the above program?
Programming is a branch of mathematics.
My CodeCall Blog | My Personal Blog

#3
Alexander

Alexander

    It's Science!

  • Moderators
  • 4,124 posts
  • Location:Vancouver, Eh! Cleverness: 200
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.
Be sure to read the updated FAQ! || Health is achieved through the same 10,000 steps.
If a suggested code/method fails, informing us is less important than telling us why or what errors occurred.




1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users