in reply to Re^2: regex incorrectly matching newline
in thread regex incorrectly matching newline
No problem. Of course, you could simplify your entire code down to:
$buf = "hello\nworld"; $buf =~ s/[^ -~]/./g; $rhs .= $buf;
The above alters the value of $buf in the process. Feel tree to make a copy of $buf and work with the copy if you want to preserve $buf's value.
|
|---|