in reply to Simplifying repetitive flow structures
The below code doesn't exactly reproduce the functionality of your code, but it's probably good enough (or can be adjusted).
my @tds = (); if ($ref->{'pic'}) { push @tds, $q->a({href=>"$ref->{'pic'}"},$ref->{'name'}); } else { push @tds, "<LI>".$ref->{'name'}; } push @tds, $ref->{'phone'}; if ($type eq 'f' || $type eq 'c') { push @tds, $ref->{'fax'}; } else { push @tds, $ref->{'cell'}; } push @tds, $ref->{'loc'}; if ($type eq 'c') { push @tds, $ref->{'con'}; } else { push @tds, $q->a({href=>"mailto:$ref->{'email'}"},$ref->{'email'}) +; } print $q->Tr([$q->td({-bgcolor=>$cellcolor},\@tds)]);
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Re: Simplifying repetitive flow structures
by Dogma (Pilgrim) on Apr 04, 2002 at 06:23 UTC |