Beefy Boxes and Bandwidth Generously Provided by pair Networks
more useful options
 
PerlMonks  

Re^4: Code optomization

by sock (Monk)
on Jul 08, 2004 at 21:30 UTC ( [id://372960]=note: print w/replies, xml ) Need Help??


in reply to Re^3: Code optomization
in thread Code optomization

I'm sorry, I don't understand. Can you explain a bit more? ----
Guns don't kill people, ninjas do.

Replies are listed 'Best First'.
Re^5: Code optomization
by sgifford (Prior) on Jul 09, 2004 at 04:46 UTC
    The problem is that you're trying to do a pattern match against an undefined variable (if the regex doesn't match, or doesn't match enough, $3 will be undefined). My solution drops out of the "loop" immediately in this case, so it never tries to do the pattern match. Roy Johnson's solution avoids entering the loop at all if $3 is undefined.

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others cooling their heels in the Monastery: (4)
As of 2024-04-18 07:03 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found