One thing that nobody else has mentioned: the first if clause can be replaced with $Max_Questions ||= $Total_Questions. (Note, though, that this has different behavor then your code when $Max_Questions is defined, but false ("0" or ""). Your code will fall through to $Max_Questions<1, mine will use $Total_Questions instead.)
In reply to Re: Optimization of a piece of code(Is there a better way than this?)
by theorbtwo
in thread Optimization of a piece of code(Is there a better way than this?)
by TStanley
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |