Beefy Boxes and Bandwidth Generously Provided by pair Networks
Problems? Is your data what you think it is?
 
PerlMonks  

Re^3: Repeating Code - there has GOT to be a better way!

by Your Mother (Canon)
on Mar 31, 2010 at 18:55 UTC ( #832120=note: print w/ replies, xml ) Need Help??


in reply to Re^2: Repeating Code - there has GOT to be a better way!
in thread Repeating Code - there has GOT to be a better way!

Great. It's best to restrict it to the smallest possible scope. Having it at the top makes it, more or less, a global which can be seen or persist anywhere in the script. This can lead to lame/long debugging sessions. Better to put it inline with the loop.


Comment on Re^3: Repeating Code - there has GOT to be a better way!
Re^4: Repeating Code - there has GOT to be a better way!
by jedikaiti (Friar) on Mar 31, 2010 at 18:57 UTC

    Gotcha - thanks!

    Kaiti
    Swiss Army Nerd

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others lurking in the Monastery: (7)
As of 2014-12-21 09:28 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    Is guessing a good strategy for surviving in the IT business?





    Results (104 votes), past polls