in reply to ( my ($argCount,@argValues) = @_ ) == Bad Idea?

I think you're confusing the way main gets called in C with the way subroutines get called in perl. In C, the main subroutine gets two parameters: the number of command line options, and the options themselves as a **char. In Perl, everything gets stuffed into @_. You can grab the number of parameters by calling my $numparam = scalar @_;, which will give you the number of elements in the array, and then the elements themselves are available via @_. Just be careful to grab the number of elements before you call shift!

  • Comment on RE: ( my ($argCount,@argValues) = @_ ) == Bad Idea?