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

Re^2: Basic Coding Tips: Parsimonious Parameterization

by greenFox (Vicar)
on Jan 31, 2005 at 07:17 UTC ( #426513=note: print w/ replies, xml ) Need Help??


in reply to Re: Basic Coding Tips: Parsimonious Parameterization
in thread Basic Coding Tips: Parsimonious Parameterization

Seen recently in a production script distributed around the company I work for-

my $var=1; while ($var == 1){ # do a bunch of stuff and never touch $var # exit if (some condition); }

while(1) must have been too difficult :)

--
Do not seek to follow in the footsteps of the wise. Seek what they sought. -Basho


Comment on Re^2: Basic Coding Tips: Parsimonious Parameterization
Download Code
Re^3: Basic Coding Tips: Parsimonious Parameterization
by Aristotle (Chancellor) on Jan 31, 2005 at 07:37 UTC

    Or, depending on structure, even

    do { # ... } until $condition;

    Makeshifts last the longest.

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others lurking in the Monastery: (11)
As of 2015-07-02 22:40 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 (46 votes), past polls