If a Perl file or application cannot be executed properly, the web browser will return an "Internal Server Error" and the Apache error log will return an error similar to the following:
End of script output before headers
One important detail is to check the status of Perl module file itself. This can be done with the "file" command:
# file testing_application.pl
showbasket.pl: Perl script, ASCII text executable, with CRLF line terminators
If CRLF Line Terminators are present, this can prevent the file from being executed properly. We can use the command line tool "dos2unix" to resolve this.
Use the command "dos2unix" via command line or terminal and run the command on the Perl file that needs to be updated.
Here is an example:
# dos2unix testing_application.pl
If the dos2unix tool is not installed, you can install it using this command:
# yum install dos2unix -y