0

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?

Olli
  • 1,231
  • 15
  • 31
JustCoding
  • 71
  • 1
  • 10

1 Answers1

1

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