smdr appears in the text of the error message of the code I linked to in the same line of the code that has $sub. I think it may have simply been something to do with the original use of the code. It wasn't part of a system error output.
Yes, the error is 'used only once' as you stated. I think my real question is how do I use $sub with 'use warnings' and not get the warning? Also, the links I found on the use of sub were "sub" rather than "$sub" and I would like to understand the addition of "$".