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.
In reply to Re^3: regex incorrectly matching newline
by ikegami
in thread regex incorrectly matching newline
by bfdi533
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |