if ($l2 =~ s/..../..../) { # $x and $y munging code # and substitution back into $l2 }