Development Guides Home >> Guide to Perl
Guide to Perl in cPanel - Modules and Scripts
cPanel & WHM includes several Perl environments. The version of cPanel & WHM that you use determines the Perl environments on your server.
While cPanel & WHM's installer requires basic Perl, cPanel & WHM does not require the
/usr/bin/perl file in order to function. cPanel & WHM's codebase and the
/usr/bin/perl file interact minimally.
Perl script modifications to use cPanel's Perl environments
If your distribution’s core Perl does not provide Perl modules, you may need to change the shebang (
#) at the top of your scripts.
Change your shebang if any of the following statements are true:
- Your scripts need to work on prior versions of cPanel & WHM.
- Your maintenance scripts tie in to the cPanel & WHM codebase.
- You want to use Perl 5.14 or later.
We recommend the following option to change the shebang (
#!/usr/bin/perl) at the beginning of your script.
Modification to function on cPanel & WHM version 11.36 and later only
If the script must only function in cPanel & WHM version 11.36 and later, replace the shebang at the beginning of your script with the following shebang:
/usr/local/cpanel/3rdparty/bin/perl symlink points to the location of Perl on the server. We do not recommend that you use the binary to which the symlink points, as it may move in future versions of cPanel & WHM.