I figured it out.
First, use 'pkginfo | grep perl' to check the package name, should be 'SMCperl', use 'pkginfo -l SMCperl' to confirm the version if desired.
Second, use 'pkgrm SMCperl' to uninstall.
Third, install the new version if needed.
It's always nice to find the solution by myself, so I will remember better.