in reply to Re^6: Error: Use of uninitialized value $item in concatenation (.) or string at...
in thread Error: Use of uninitialized value $item in concatenation (.) or string at...
Basically, $1 and $2 only become 'undef'-ed when there is a un*successful* match.
I'm not sure what you mean by "un*successful*", but it is likely to be (mis-)understood to mean something that is incorrect.
AnomalousMonk has told you correctly. To emphasize where I think you may have gone wrong (or at least easily misunderstood as wrong) I might rewrite what you wrote as:
Basically, $1 and $2 only become 'undef'-ed when there is a successful match and the matching expressions do not include any bracketing constructs "(...)" containing expressions that matched .
That's not an elegant statement, and it may be more confusing than helpful, but it avoids the suggestion that an unsuccessful match might change the match variables ($1, $2, etc.).