The `string_ref` call predates when the `""` operator was overriden. Now you can simply do

```perl
$fh =~ s{.*\s+$self->{mountpoint}\s+\.*\n}{};
```
Or `add_or_replace_lines` and its variants.