The assignment to `$substring` is dead and can be removed.