JustCoding
JustCoding

Reputation: 71

How to run perl script on linux server, which is operated by cPanel?

Can any one please tell me how to run perl script on server. I uploaded it using FTP. Script does not work by adding .pl file in cgi-bin folder. I also tried uploading it with cPanel.

BEGIN {
   my $base_module_dir = (-d '/home/username/perl' ?
   '/home/username/perl' : ( getpwuid($>)
   )[7] . '/perl/');
  unshift @INC, map { $base_module_dir . $_ } @INC; }

For last option I even tried to add

#!/usr/bin/perl

in the beginning of the script.

What else I could try?

Upvotes: 0

Views: 1828

Answers (1)

joshstewart
joshstewart

Reputation: 48

You probably need the execute bit set: chmod +x filename.pl

Upvotes: 1

Related Questions