in reply to Pattern matching in binary mode

It's important to realize that "binary files" and "text files" are things humans find important. For a computer, there's no difference. It just sees the byte '37', and it that has no futher meaning. Humans might interpret that as the character '7' though.

"binmode" is only relevant for some OSses, and have to do with translation of end-of-line markers.

Hence, whether you want to replace the ASCII character 7, or the byte 37, you'd do the same.

s/7/this is a seven/;
and
s/\x37/this is a seven/;
will do the same thing.

Abigail