Anonymous Monk has asked for the wisdom of the Perl Monks concerning the following question:
for (my $i = 0; $i < @existing_wells; $i++) { if ($existing_wells[$i] == 1) { print qq(<area href="http://cgi-bin/$graph_links[0 +]" ALT="" shape="circle" coords="13,9,6">); } else { print qq(<area href="http://cgi-bin/array.bmp" ALT +="" shape="circle" coords="13,9,6">); } if ($existing_wells[$i+1] == 2) { print qq(<area href="http://cgi-bin/$graph_links[1 +]" ALT="" shape="circle" coords="184,9,6">); } else { print qq(<area href="http://cgi-bin/array.bmp" ALT +="" shape="circle" coords="184,9,6">); } }
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: minimising repetitive if-elsing
by zby (Vicar) on May 29, 2003 at 14:30 UTC | |
|
Re: minimising repetitive if-elsing
by TomDLux (Vicar) on May 29, 2003 at 14:47 UTC | |
|
Re: minimising repetitive if-elsing
by hardburn (Abbot) on May 29, 2003 at 14:15 UTC |