Beefy Boxes and Bandwidth Generously Provided by pair Networks
Your skill will accomplish
what the force of many cannot

Re^3: string error message

by ysth (Canon)
on Jun 16, 2009 at 05:59 UTC ( #771891=note: print w/replies, xml ) Need Help??

in reply to Re^2: string error message
in thread string error message

That regex won't produce undef for one of the captures only some of the time - the match is failing, so all the variables are presumably undef.

Replies are listed 'Best First'.
Re^4: string error message
by Marshall (Abbot) on Jun 16, 2009 at 06:20 UTC
    Not necessarily. That may not happen in the general case. This gets complex. In this particular regex, I think you are right, the first undef results in subsequent undef's. In any event the code I showed will show what happens. As a response I tried to show a method to debug this. The "here is how to grow wheat" instead of "here is some wheat" idea. I'm hoping that it helped.

Log In?

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://771891]
and all is quiet...

How do I use this? | Other CB clients
Other Users?
Others chanting in the Monastery: (4)
As of 2018-06-23 01:11 GMT
Find Nodes?
    Voting Booth?
    Should cpanminus be part of the standard Perl release?

    Results (125 votes). Check out past polls.