[Date Prev][Date Next][Thread Prev][Thread Next] [Search] [Date Index] [Thread Index]

Re: [MacPerl] testing



the actual code, most of it anyways (sans comments and the actual blocks executed). $where is a number between 3 and 18 often a whole number but not always. The loops are kept seperate mainly because of their functionality. The code works, works fine actually; I was just wondering if there was a way to simplify it and shorten the lines somewhat.

     if ($where == 7 or $where == 15 or $where == 16 ) { }
     if ($where == 6 or $where == 8 or $where == 12 or $where == 13 or $where == 14 ) { }

     if      ($where <= 4) {
     } elsif ($where == 5.2 or $where == 5.3) {
     } elsif ($where >= 17 and $damage[0] =~ /imp/) {
     } elsif ($where == 10.1) {
     } elsif ($where == 5.5) {
     } else { }

     if      ($where <= 4) {
     } elsif ($where == 5 or $where >= 17) {
     } elsif ($where == 5.2 or $where == 5.3) {
     } elsif ($where == 5.5) {
     } elsif ($where == 6 or $where == 8 or ($where >= 12 and $where <= 14)) {
     } elsif ($where == 7 or $where == 7.1 or $where == 15 or $where == 16) {
     } elsif ($where == 9 or $where == 10 or $where == 11) { }

     if ($where <= 5
       or ($where >= 17 and $damage[0] =~ /cr/)
       or $where == 11.1
       or $where == 5.1
       or $where == 5.4) { }

le meas,
--Nick

# ===== Want to unsubscribe from this list?
# ===== Send mail with body "unsubscribe" to macperl-request@macperl.org