How to trim URL to root domain?

If perl (run from within KM) finds its modules now, but you get a weird dyld: error, then in the script replace the

#!/usr/bin/env perl

with

#!/usr/local/bin/perl