I have scalar %$tags which tells me the number of items in $tags, so I can construct appropriate if statements, and values %$tags gets the actual values. How can I get the values of only the first 10 items? Is there syntax to say "get the nth item from this array"? The relevant line is currently: $out .= LJ::ehtml(join ', ', sort map { $_->{name} } values %$tags); which gets all the items in the array.
no subject
I have
scalar %$tagswhich tells me the number of items in $tags, so I can construct appropriate if statements, andvalues %$tagsgets the actual values. How can I get the values of only the first 10 items? Is there syntax to say "get the nth item from this array"? The relevant line is currently:$out .= LJ::ehtml(join ', ', sort map { $_->{name} } values %$tags);which gets all the items in the array.