How to trim URL to root domain?

The Domain::PublicSuffix module you have installed before, is it located here? That is, do you have this folder?

~/perl5/lib/perl5/Domain/PublicSuffix