> > > %professors{ $a->name cmp $b->name };
> > >
> > > %students{ $$students{$b}{GPA} <=> $$students{$a}{GPA} };
> >
> > These already mean something. Please don't "special-case" them.
>
> No they don't.
Apologies. You're quite correct.
> > Isn't this better handled with a (revamped and faster) tie?
> >
> > tie %professors, 'Tie::Sorted', ^a->name cmp ^b->name;
> >
> > tie %students, 'Tie::Sorted',
> > $$students{^1}{GPA} <=> $$students{^0}{GPA} };
> >
> > Damian
>
> It's a shorthand for it.
But not an obvious one, I fear. I'd be happier if it were more
"assignment-ish", say:
%professors = ^a->name cmp ^b->name;
%students = $$students{^1}{GPA} <=> $$students{^0}{GPA} };
Actually, no I wouldn't.
I'd be happier if it were more explicit.
How about:
keys %professors = ^a->name cmp ^b->name;
keys %students = $$students{^1}{GPA} <=> $$students{^0}{GPA} };
;-)
Damian