in reply to Re: sorting tree with folders on top
in thread sorting tree with folders on top

hash key 'file' represents files. folders do not have this key. that's why:
if ($$a{'file'} && !$$b{'file'}) { return 1; } elsif (!$$a{'file'} && $$b{'file'}) { return -1; }