in reply to My first module
It is printing 11 because you have the:
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=@_;
ormy ( $in_arg ) = @_;
There is a difference between the two related to the side-effects but you won't notice it in your code.my $in_arg = shift;
/J\
|
|---|