Just let my comments rest, please, even if they are unrelated to one another as here. Say whatever you please, then click the Back button on your browser instead of Send. I am tired of always being on the defensive ’nuff said, knock it off.
- If the response is in JSON, decode it as a black box.
- (Separate and unrelated...) Anytime you do a regex match that is always supposed to work, check that it didn’t. Anytime you have a chain of if..else if structures that is always supposed to cover all cases, add just one more check that it did.
It is fortuitous that a failed-to-match regex did cause an “uninitialized value” because the OP realized that there must be a problem. Right now at $WORK I am chasing what I know to be a similar situation and it’s in PHP (which is notorious for assuming that everything you write must somehow be right) and it could be anywhere in thousands of lines of unfamiliar code. The fix will probably be a one-liner ... when I find it. In other places where more-suspicious coding has been done (the MySQL stack is now full of such land-mines), bugs that no one ever knew existed(!) are identified ... and located with a trace-back. Formerly, they merely surfaced (if they did at all) as “odd” (unexplained ...) website behaviors or incorrectly-calculated orders.
2018-07-03 Athanasius reparented