in reply to Broken regexp

Do you happen to want ||| to become |\N|\N|? If so, put the second \| in a look ahead assertion and remove it from the replacement string. (see perlre)

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