On 12/29/2006 12:22 AM, M. Lewis wrote:
[...]
I thought I'd prefer to have it listed more like this:

jelly -- strawberry
         apple
         grape
         pear
[...]
So in the following snippet, I tried to add a "\n" onto the value of the HoH.

for my $i ( keys %HoH ) {
    %{$HoH{$i}} = join ("\n", %{$HoH{$i}}, "");
    print "$i -- @{[ keys %{$HoH{$i}} ]}\n";
}
[...]

I advise against changing the original keys. The variable $" determines what string is used to separate array elements expanded within a quoted string (read "perldoc perlvar"). I would set $" to "\t\n" before printing.

Good luck.




--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
http://learn.perl.org/


Reply via email to