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

Yes. $numArgs isn't a variable that Perl sets for you. Check the @ARGV array instead: if (@ARGV < 3). See perlvar for a list of all the variables that perl might sometimes set for you.