You do not see the single scalar because all arguments passed into a subrutine are flatened into a list. So when you call your sub cog_class(@somearray, $somescalar); the $somescalar variable and @somearray all became @_ in the subrutine.
If you only need one array and one scalar just switch them places cog_class($somescalar,@somearray); and if you need more complex data structures unchanged I suggest passing it by reference.
And another thing, you can't use those scalars by name in the sub unless you take them out of @_, you can do it like this:
#!/usr/bin/perl
use warnings;
use strict;
my $scalar = 'a';
my @array = qw(1 2 3);
some_sub($scalar,@array);
sub some_sub {
my $scalar = shift; # take the first element out of @_
# and the first element in this case is $scalar with 'a'
# inside
my @array = @_; # pass all the remaining arguments into
# @array so it now contains 1,2,3
}
I suggest that you read more about subrutines in the:
perldoc perlsub