$line =~ s/(?<=\|)(?=\|)/\\N/g; [download]
In reply to Re: Broken regexp by jbware in thread Broken regexp by ColtsFoot