tamaguchi has asked for the wisdom of the Perl Monks concerning the following question:
..and my first module..test.pl ------ #!/usr/bin/perl -w use strict; use test_module; my $var=10; my $new_var=testsub($var); print "$new_var\n";
Could someone explain why this construct prints out "11" instead of 20?? Thank you for your help.test_module.pm ----------------------- sub testsub { my $in_arg=@_; my $new_arg=$in_arg+10; return($new_arg); } 1;
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: My first module
by GrandFather (Saint) on Apr 26, 2006 at 11:34 UTC | |
by blazar (Canon) on Apr 26, 2006 at 13:19 UTC | |
|
Re: My first module
by gellyfish (Monsignor) on Apr 26, 2006 at 11:36 UTC | |
|
Re: My first module
by blazar (Canon) on Apr 26, 2006 at 13:27 UTC | |
|
Re: My first module
by TedPride (Priest) on Apr 26, 2006 at 17:00 UTC | |
|
Re: My first module
by osunderdog (Deacon) on Apr 26, 2006 at 13:34 UTC | |
|
Re: My first module
by perladdict (Chaplain) on Apr 27, 2006 at 06:32 UTC | |
| A reply falls below the community's threshold of quality. You may see it by logging in. |