How "does it err" ?
Have you looked at the documentation for the sort function ? The variables $a and $b are magical for the sort function and you should not declare them as lexical variables using my. In fact, you should not name any of your own variables $a or $b.
As a general hint for receiving effective answers to your questions, see How (Not) To Ask A Question.
In reply to Re: Declaring my variables in sort function?
by Corion
in thread Declaring my variables in sort function?
by kettle
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |