|Perl Monk, Perl Meditation|
Calling a subroutine located in a moduleby Anonymous Monk
|on Nov 02, 2001 at 04:06 UTC||Need Help??|
Anonymous Monk has asked for the
wisdom of the Perl Monks concerning the following question:
OK, I am stumped. What's new!
I am working on a small module(my first but not last) of my own brewing. And I have generated a test script to test the module. I have a test.pl which calls a module which is exporting a subroutine OpenNotes. The problem is as follows.
"my $notesreturn = OpenNotes($var1, $var2);"
This fails for
Undefined subroutine &main::OpenNotes called at C:\My …\test.pl line 31.
Now if I remove the "my $notesreturn =" And just have OpenNotes($var1,$var2);
I don't get an error until latter in the script when $notesreturn is needed.
Anyone have a good ideas.