I'm a newbie with Perl. I've created a simple file test.pl with the code:
#!/usr/bin/perl
print 'test';
uploaded it to my shared hosting with Linux where PERL is enabled and changed my PERL file permissions to 755 via cPanel file manager.
But when I follow by the link like mydomain.com/test.pl, I receive the "500 Internal Server Error".
In the "Errors" section of my cPanel I see just the line
uid: (1639/uahst341) gid: (1641/uahst341) cmd: test.pl
where uahst341 is the current user of cPanel
I don't have the access to the command line. Can I and how to run the file without the command line prompt?
UPDATED
With the help of my hosting provider I found out that I must to create PERL file inside of /cgi-bin folder, type a code via cPanel File manager and add the line like print "Content-type: text/html\n\n"; However, when I write the same code in Notepad++ in UTF-8 and then upload the file to the server, I again receive the 500 error and see that uploaded file has 2 bytes more than created via File manager (in UTF-8). So there is a problem with the encoding. Which exactly?