pauamma: Cartooney crab wearing hot pink and acid green facemask holding drink with straw (Default)
Res facta quae tamen fingi potuit ([personal profile] pauamma) wrote in [site community profile] dw_dev 2009-10-07 03:10 pm (UTC)

Something like:
$out .= LJ::ehtml(join ', ', sort { $a cmp $b } map { $_->{name} } (values %$tags)[0..9]);
if you want the first 10 without sorting, or:
$out .= LJ::ehtml(join ', ', (sort { $a cmp $b } map { $_->{name} } values %$tags)[0..9]);
if you want the first 10 sorted by the name field.

(Also, added the missing comparison function to your sort, assuming you want string ordering. Adjust as needed.)


Post a comment in response:

If you don't have an account you can create one now.
HTML doesn't work in the subject.
More info about formatting

If you are unable to use this captcha for any reason, please contact us by email at support@dreamwidth.org