in reply to Turning a hash into a line of links
How about something like this? ...
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"); }
It prints a leading | instead, but not before the very first link.
Update: If you really want to do it with map, I'd suggest something like this:
print join("|", map { a({-href => "/$sections{$_}"}, "$_ HOME") } sort + keys %sections);
|
|---|