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\
In reply to Re: My first module
by gellyfish
in thread My first module
by tamaguchi
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |