in reply to use of $sub
The string $SUB only shows up in that code once. You probably get a warning message like:
Generally, variables are expected to be assigned a value before they are used. Use diagnostics to get more information.Name "main::SUB" used only once: possible typo
Also wondering what "smdr" in the error message refers to.What error message? You should post the exact error message you are receiving, as well as at least a snippet of the relevant code.
In Section
Seekers of Perl Wisdom