If you receive a warning message like the following

WARNING: '/usr/lib/perl5/5.30' contains data from at least 1 packages which will NOT be used by the installed perl interpreter.
 -> Run the following command to get a list of affected packages: pacman -Qqo '/usr/lib/perl5/5.30'

Then you will need to rebuilt whichever package(s) so they are usable by the newer version of perl on Arch.

The quick-and-dirty way of doing this using the yay package manager is as follows:

perl_upgrade () 
    perl_latest=$(find /usr/lib/perl*/ -maxdepth 1 -mindepth 1 -type d | sort -V | tail -1);
    printf "Finding all perl packages in $perl_latest ...\n";
    yay -S $(pacman -Qqo $perl_latest)