in reply to Regex replace leaking memory.
I cannot reproduce your issue using Strawberry Perl 5.28.0.
1 new 000000000072a728 :
You might need to provide more details from perl -v (or perhaps perl -V).
Update:
Also cannot reproduce using perl 5.30 using perlbrew under Windows Subsystem for Linux.
perl -v:
This is perl 5, version 30, subversion 0 (v5.30.0) built for x86_64-li +nux
In Section
Seekers of Perl Wisdom