my @sorted = sort keys(%sections); for (my $i = 0; $i < @sorted; $i++) { ($i > 0) and print "|"; my $s = $sorted[$i]; print a({-href => "/$sections{$s}"}, "$s HOME"); } #### print join("|", map { a({-href => "/$sections{$_}"}, "$_ HOME") } sort keys %sections);