in reply to How do I print the values of a hash, sorted by the hash keys?

You can also do this:
foreach my $key (sort keys %data) { print $data{$key} . $/; }
However, my first answer works well with a join():
print join('|', @data{sort keys %data});

Originally posted as a Categorized Answer.