in reply to Use of a module(s) fetches error 500!
Pay particular attention to the library search-path, which normally is specified by a PERL5LIB environment-variable that you probably “set, long ago, in .bash_profile or someplace, and then promptly forgot about.” A script that is designed to work in a browser often uses the use lib declaration to explicitly set the module-path that is to be used. Or, environment-variables can be set up in Apache (or nginix), such that they will exist and have the proper values when the Perl script runs.
This is actually a very common “head-banger problem” that pops up when you’re doing any sort of CGI (and, in an entirely different way, mod_yourlanguage) work. Your script is now running in a completely different environment, and it’s probably running as nobody.
The error_log for this site (virtual-host ...) will contain the complete message that was produced by Perl (or whatever-it-is). So, that’s the place to begin.