in reply to Using undefined back-references?

You can try using the e modifier in the substitution and have the replacement be something like this:

/qq{<$1 $2="$3,$5"} . ($4 || '')/gex

This should remove the warning by using '' instead of $4 if it's empty (it can't be 0 so there is no need for defined $4 here).

--
The Error Message is GOD - MJD