in reply to Help interpreting this code

When you get warnings you do not understand, try using the diagnostics module:

\1 better written as $1 at - line 3 (#1) (W syntax) Outside of patterns, backreferences live on as variables. The use of backslashes is grandfathered on the right-hand side of a substitution, but stylistically it's better to use the variable form because other Perl programmers will expect it, and it works better i +f there are more than 9 backreferences.