Hi,
I see a problem in your IF statement. Try this out:
$i="hello\nworld";
if ($i =~ s/[^ -~]/./g)
{
$rhs .= $i;
}
else
{
$rhs .= ".";
}
print $rhs;
Sriram
In reply to Re: regex incorrectly matching newline
by rsriram
in thread regex incorrectly matching newline
by bfdi533
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |