I have an hash and i want to sort based on the keys with upper case words appearing just before the lowercase words.
Example:
JANE jane JIM
Try:
@list = ("jane","JIM","JANE","jim"); print sort { uc $a cmp uc $b or $a cmp $b } @list;