Beefy Boxes and Bandwidth Generously Provided by pair Networks
No such thing as a small change
 
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 romping around the Monastery: (11)
As of 2014-09-02 08:18 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    My favorite cookbook is:










    Results (20 votes), past polls