Beefy Boxes and Bandwidth Generously Provided by pair Networks
Think about Loose Coupling
 
PerlMonks  

Re: Re: Flag variables

by Anonymous Monk
on Mar 04, 2003 at 14:19 UTC ( #240354=note: print w/ replies, xml ) Need Help??


in reply to Re: Flag variables
in thread Flag variables

You made sense but, if you can set a flag in the loop, you can also call a subroutine in the same place as you were setting the flag, and the subroutine can do what ever you would have done as a result of the flag being set after the loop, so your back to square one.

That's not to say that there aren't occasions when a flag is necessary, or even just easier, but most times they can be avoided and the code benefits from their avoidance.


Comment on Re: Re: Flag variables

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others imbibing at the Monastery: (10)
As of 2015-07-28 18:02 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    The top three priorities of my open tasks are (in descending order of likelihood to be worked on) ...









    Results (258 votes), past polls