note
linuxer
Just some thoughts:
<p>If you want to compare Perl with grep you need to compare the same behaviour.
</p>
<p>Your grep uses -z ("Treat the input as a set of lines, each terminated by a zero byte (the ASCII NUL character) instead of a newline."). So it breaks the "classical" definition of a line.</p>
<p>I do not see something similar in your perl command. So it uses the "classical" line definition. At the same time, I think, your Regex in the perl command would not match a newline character with the '.', because it does not use the /s modifier.</p>
1147947
1147947