in reply to s/// question

It looks fine to me.

$regel = "Username; abcd; Username"; $regel =~ s/Username/\nGebruikersnaam/sgm; print "(BEGIN)$regel(END)\n"; __END__ output: (BEGIN) # <-- \n here Gebruikersnaam; abcd; # <-- and \n here Gebruikersnaam(END)

Maybe the problem is in your output routine. Are you producing HTML? If so, a "\n" doesn't have any effect, unless inside <pre> </pre> tags.