in reply to Use of uninitialized value in numeric lt (<)

In adition to the other replies, only say that if you want the number of arguments to the script you can use @ARGV in scalar context, ie:

if(@ARGV < 3) { # Blah }

And I agree with the rest of the monks, ALLWAYS use strict. (And warnings).