in reply to question about finding strings?

The modifiers should be OUTSIDE the regex, as in:
m/ ( .{0,25} $string.{0,25} ) /gisx
And no - it will not modify your original file.

                All power corrupts, but we need electricity.