Anonymous Monk has asked for the wisdom of the Perl Monks concerning the following question:
I need the output to be like this:California: Oakland Fresno San Diego Oregon: Portland Eugene Corvallis Utah: Salt Lake Provo
Current attempt:California: Oakland Fresno San Diego Oregon: Portland Eugene Corvallis Utah: Salt Lake Provo
Please advise.foreach $field (qw(California_c Oregon_o Utah_u)) { my @values = grep { ! /^\s*$/ } param($field); next unless @values; # Skip if nothing available # Establish a header line. my $header = ""; $header = "California:" if $field =~ /California_c/; $header = "Oregon:" if $field =~ /Oregon_o/; $header = "Utah:" if $field =~ /Utah_u/; #local $, = "\n"; $theData .= "$header\n@values\n\n"; } ...... <table align=\"center\"> <tr><td><pre><font face=\"Arial, Helvetica, sans-serif\" color=\"blue\ +"><strong>$theData</strong></font></pre></td><tr> </table>
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: output from a form page with multiple selects
by Transient (Hermit) on Jun 02, 2005 at 14:41 UTC | |
by Anonymous Monk on Jun 02, 2005 at 14:50 UTC | |
|
Re: output from a form page with multiple selects
by ikegami (Patriarch) on Jun 02, 2005 at 17:07 UTC |