in reply to s/// question

I can't recreate your problem, I get newlines on both win and linux here. But perhaps you could work around it by using $/ - the input record separator instead of specifying \n. Like this:

$regel =~ s[Username][$/Gebruikersnaam]sgm;

Mats