Anonymous Monk has asked for the wisdom of the Perl Monks concerning the following question:
This post is a result of Passing a required script arguments
Below is my code I'm using, and I simply want to print the argument passed to the Foo module:
The module seems to work but it's returning "NAME: Foo", and not "TEST".#####Foo.pm###### package Foo; sub test{ my $name = shift; return $name; } 1; ##### bar.pl ##### #!/perl/bin/perl use warnings; use strict; use Foo; my $name=Foo->test("TEST"); print "NAME: $name\n";
Thanks in advance
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: First Perl Module!!
by hardburn (Abbot) on Sep 26, 2003 at 16:18 UTC | |
|
Re: First Perl Module!!
by Ovid (Cardinal) on Sep 26, 2003 at 16:49 UTC | |
|
Re: First Perl Module!!
by broquaint (Abbot) on Sep 26, 2003 at 16:20 UTC |