in reply to Re: i must have forgotten how split works...
in thread i must have forgotten how split works...

So a split on "\."
No... "\." is still ".". The constructed string should contain a backslash, so you have to write either "\\." or '\.' (or '\\.'). Constructing a regexp in a string is a bit of a pain. That's one of the reasons why qr was invented: qr/\./ will do the right thing, and still return something that can be treated like a string.

Safer still is to stop playing games and just use the regexp, and write

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