Anonymous Monk has asked for the wisdom of the Perl Monks concerning the following question:
if ($total_nums <= 30) { $test_nums = 1; } if ($total_nums >= 31 and $total_nums <= 60) { $test_nums = 2; } if ($total_nums >= 61 and $total_nums <= 90) { $test_nums = 3; } if ($total_nums >= 91 and $total_nums <= 120) { $test_nums = 4; } if ($total_nums >= 121 and $total_nums <= 150) { $test_nums = 5; } if ($total_nums >= 151 and $total_nums <= 180) { $test_nums = 6; }
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: condensing code
by chromatic (Archbishop) on Sep 08, 2006 at 17:48 UTC | |
|
Re: condensing code
by jdtoronto (Prior) on Sep 08, 2006 at 17:50 UTC | |
|
Re: condensing code
by merlyn (Sage) on Sep 08, 2006 at 21:21 UTC | |
|
Re: condensing code
by ptum (Priest) on Sep 08, 2006 at 17:50 UTC | |
|
Re: condensing code
by diotalevi (Canon) on Sep 08, 2006 at 17:54 UTC | |
|
Re: condensing code
by friedo (Prior) on Sep 08, 2006 at 17:51 UTC | |
by derby (Abbot) on Sep 08, 2006 at 17:57 UTC | |
by ptum (Priest) on Sep 08, 2006 at 18:02 UTC | |
by derby (Abbot) on Sep 08, 2006 at 18:21 UTC | |
by ptum (Priest) on Sep 08, 2006 at 20:00 UTC | |
|
Re: condensing code
by jZed (Prior) on Sep 08, 2006 at 17:47 UTC | |
by ikegami (Patriarch) on Sep 08, 2006 at 18:15 UTC | |
by Anonymous Monk on Sep 08, 2006 at 17:50 UTC | |
by jZed (Prior) on Sep 08, 2006 at 17:53 UTC | |
|
Re: condensing code
by BrowserUk (Patriarch) on Sep 08, 2006 at 17:55 UTC | |
|
Re: condensing code
by ady (Deacon) on Sep 08, 2006 at 18:08 UTC | |
|
Re: condensing code
by Anonymous Monk on Sep 08, 2006 at 18:08 UTC | |
by Cristoforo (Curate) on Sep 08, 2006 at 19:13 UTC | |
by Anonymous Monk on Sep 08, 2006 at 19:34 UTC | |
by Cristoforo (Curate) on Sep 08, 2006 at 21:37 UTC | |
by Anonymous Monk on Sep 08, 2006 at 18:10 UTC | |
|
Re: condensing code
by Anonymous Monk on Sep 08, 2006 at 17:39 UTC |