in reply to i must have forgotten how split works...

my ($pre, $suf) = split ("." , $DOMAIN);

The mistake here is that you used "" for split's first argument. split takes a regex as its first argument. There is one exception: the string ' ' (a single chr(32) character), which is special. Every other string you pass it is interpreted as a regex.

If you write it as it is interpreted, the mistake is easier to find:

split /./, $DOMAIN
It is now clear even to human beings that the . is a regex. It is a metacharacter, so you need to escape it if you want it to be matched literally:
split /\./, $DOMAIN # or split /[.]/, $DOMAIN

Juerd # { site => 'juerd.nl', plp_site => 'plp.juerd.nl', do_not_use => 'spamtrap' }