Overview

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 environments

Select the tab for your version of cPanel & WHM to view the available Perl environments on your server:

Custom modules in cPanel & WHM

We regularly update cPanel & WHM's internal Perl. However, these updates may impact your custom Perl modules.

cPanel & WHM version 70 and later

cPanel & WHM version 62 through 68

cPanel & WHM version 56 through 60

cPanel & WHM version 11.46 through 54

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


The /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.


Additional documentation