in reply to Passing subroutines as arguments

Don't use $a and $b. Those should be left reserved for sort. Even though my does lexicalize them, it will cause problems if you try and sort them.

------
We are the carpenters and bricklayers of the Information Age.

Don't go borrowing trouble. For programmers, this means Worry only about what you need to implement.

Please remember that I'm crufty and crochety. All opinions are purely mine and all code is untested, unless otherwise specified.