in reply to
Broken regexp
To borrow a concept from
Juerd
's comment, you could try the following, using zero-width look-ahead & look-behind assertions.
$line =~ s/(?<=\|)(?=\|)/\\N/g;
[download]
-jbWare
Comment on
Re: Broken regexp
Download
Code
In Section
Seekers of Perl Wisdom