A minor criticism, but you are playing with fire by using variables named $a and $b. Both of these have special meaning to perl as they are used by the sort function. It is a very good idea to get into the habit of not using them at all, even if you do not use sort in the same code, as a later innocent addition of a sort command can result in very difficult to track down bugs.
Yves / DeMerphq
--
Have you registered your Name Space?