Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl-Sensitive Sunglasses
 
PerlMonks  

Re^7: Error: Use of uninitialized value $item in concatenation (.) or string at...

by ig (Vicar)
on Jun 13, 2011 at 10:26 UTC ( #909359=note: print w/ replies, xml ) Need Help??


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.).


Comment on Re^7: Error: Use of uninitialized value $item in concatenation (.) or string at...

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://909359]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others exploiting the Monastery: (9)
As of 2014-07-25 20:00 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    My favorite superfluous repetitious redundant duplicative phrase is:









    Results (175 votes), past polls