in reply to Re^3: modifying a file with regex!
in thread modifying a file with regex!

But in your code, there is no s/// regex, there is a variable. And even if there had been any change in $_, there is no output going on.