This is a relatively small nit. But the variables $a and $b are used for special things within Perl like the sort function and sometimes other stuff. Get in the habit of using some other name like $x,$y or $xa, $xb or whatever. While there is nothing wrong with this short example, a longer example might bite back with an unexpected/or confusing result. There are lots of possible names, avoiding $a and $b for your own use is a good idea.