sulfericacid has asked for the wisdom of the Perl Monks concerning the following question:
I need to alter the output just a little bit. The items still need to be comma delimited but now I need to be able to put an html link code around each printed word (value).
I'm still not sure how this is printing the way it is, much less know how to add more HTML to it.
to yieldmy %hash; push @{$hash{"3"}}, "apple"; push @{$hash{"2"}}, "pear"; push @{$hash{"5"}}, "orange"; push @{$hash{"3"}}, "grape"; push @{$hash{"2"}}, "icky pineapple"; # for a lack of a better way to show my hash # we'll create our own the hard way for my $key (reverse sort keys %hash) { print "<b>$key characters</b><br>", join(", ", @{$hash{$key}}), "<b +r><br>"; }
5 chars <a href="link.pl?=orange">orange</a> 3 chars <a href="link.pl?=apple">apple</a>, <a href="link.pl?=grape">grape</a>
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Custom HOA printing
by atcroft (Abbot) on Jan 28, 2006 at 17:40 UTC | |
|
Re: Custom HOA printing
by wfsp (Abbot) on Jan 28, 2006 at 17:53 UTC | |
|
Re: Custom HOA printing
by serf (Chaplain) on Jan 28, 2006 at 18:45 UTC | |
by McDarren (Abbot) on Jan 29, 2006 at 00:37 UTC | |
|
Re: Custom HOA printing
by McDarren (Abbot) on Jan 28, 2006 at 17:34 UTC |