in reply to My first module

It is printing 11 because you have the:

my $in_arg=@_;
Which is giving scalar context to the assignment from @_ which puts the length of the array in $in_arg you want to do either:
my ( $in_arg ) = @_;
or
my $in_arg = shift;
There is a difference between the two related to the side-effects but you won't notice it in your code.

/J\