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

The problem is that you're putting $argCount and @argValues into a list context by enclosing them in the parentheses from the my(). That means that the first value in @_ is assigned to $argCount and the remaining arguments are assigned to @argValues. The solution to this is to do a two step assignment. You say:
my(@argValues) = @_; my($argCount) = scalar(@argValues); #or $#argValues + 1
It's necessary to explicity force @argValues into a scalar context for this to work, because again the parens from my() create a list context.

Replies are listed 'Best First'.
RE: Re: ( my ($argCount
by btrott (Parson) on Feb 10, 2000 at 23:43 UTC
    ...from which it follows that if you *don't* enclose your my variable in parentheses, you don't have to force scalar context:
    my $argCount = @argValues;