|Welcome to the Monastery|
Re: Two simple code style advice questionsby blue_cowdawg (Monsignor)
|on Jan 16, 2013 at 14:33 UTC||Need Help??|
I like code that I can see exactly what is going on without going back and forth in the lines of code. Especially when a script becomes gargantuan. In your first case:
would be my preferred style. I could also go with:
as long as those two lines are next to each other in the code. Passing a reference to a hash to subs later on is more readable to my eyes that something like:
but that is a personal preference.
In your second case I am a big fan of
kinds of things. (Line right out of one of my projects). The term OK is the result of a stack of use constant OK =>0; sorts of things where I use constants to aid in my code's readability.
Peter L. Berghold -- Unix Professional
Peter -at- Berghold -dot- Net; AOL IM redcowdawg Yahoo IM: blue_cowdawg