Dogma has asked for the wisdom of the Perl Monks concerning the following question:
if ($type eq 'f') { if ($ref->{'pic'}) { print $q->Tr([ $q->td({-bgcolor=>$cellcolor},[$q->a({href=>"$ +ref->{'pic'}"},$ref->{'name'}),$ref->{'phone'},$ref->{'fax'},$ref->{' +loc'}, $q->a({href=>"mailto:$ref->{'email'}"},$ref->{ +'email'}) ]) ]); } else { print $q->Tr([ $q->td({-bgcolor=>$cellcolor},["<LI>".$ref->{' +name'},$ref->{'phone'},$ref->{'fax'},$ref->{'loc'}, $q->a({href=>"mailto:$ref->{'email'}"},$ref->{ +'email'}) ]) ]); } } elsif ($type eq 'c') { if ($ref->{'pic'}) { print $q->Tr([ $q->td({-bgcolor=>$cellcolor},[$q->a({href=>"$ +ref->{'pic'}"},$ref->{'name'}),$ref->{'phone'},$ref->{'fax'},$ref->{' +loc'}, $ref->{'con'}]) ]); } else { print $q->Tr([ $q->td({-bgcolor=>$cellcolor},["<LI>".$ref->{' +name'},$ref->{'phone'},$ref->{'fax'},$ref->{'loc'}, $ref->{'con'}]) ]); } } else { if ($ref->{'pic'}) { print $q->Tr([ $q->td({-bgcolor=>$cellcolor},["<IMG SRC=\"/im +ages/thumb_$ref->{'pic'}\">   ".$q->a({href=>"/images/$ref->{ +'pic'}"},$ref->{'name'}),$ref->{'phone'},$ref->{'cell'},$ref->{'loc'} +, $q->a({href=>"mailto:$ref->{'email'}"},$ref->{ +'email'}) ]) ]); } else { print $q->Tr([ $q->td({-bgcolor=>$cellcolor},['<LI>  &nbs +p '.$ref->{'name'},$ref->{'phone'},$ref->{'cell'},$ref->{'loc'}, $q->a({href=>"mailto:$ref->{'email'}"},$ref->{ +'email'}) ]) ]); } }
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Simplifying repetitive flow structures
by gav^ (Curate) on Apr 01, 2002 at 02:15 UTC | |
by Dogma (Pilgrim) on Apr 01, 2002 at 03:21 UTC | |
by gav^ (Curate) on Apr 01, 2002 at 04:47 UTC | |
by jbisbee (Pilgrim) on Apr 01, 2002 at 14:19 UTC | |
|
Re: Simplifying repetitive flow structures
by eisenstein (Acolyte) on Apr 01, 2002 at 08:11 UTC | |
by Dogma (Pilgrim) on Apr 04, 2002 at 06:23 UTC | |
|
Re: Simplifying repetitive flow structures
by admiralh (Sexton) on Apr 01, 2002 at 16:55 UTC |