Subject: | Errors reported via $@ accumulate between calls |
When sendMsg fails, it reports its error via the $@ variable. While internally this variable is reset every call to sendMsg, the global $error_texts that assigns to it isn't, so $@ ends up containing ALL error messages for all past failed calls.
To fix, simply reset $error_texts as well:
< sub sendMsg{
< $@='';
---
Show quoted text
> sub sendMsg{
> $@=$error_texts='';