in reply to Read two values from input
Nobody yet mentioned that you shouldn't be using $a and $b, as those two variables are reserved for use by the sort function.