note
Anonymous Monk
<p>Thanks to the writer for your trouble. But everyone seems to get it except me. I have tried to duplicate your results.</p>
<p>I have:</p>
<p>- MyScript.pl under /storage/username/PERL_SCRIPTS/dev</p>
<p>- Test.pm under /storage/username/local/perl/site/lib/Test/Test.pm (I just replaced MyModule.pm with Test.pm).</p>
<p>The module code is exactly the same. In MyScript.pl I have added</p>
<code>use lib '/storage/username/local/perl/site/lib';
<p>and typed in the first two cases.</p>
<code>perl MyScript.pl</code> gives:
<code>Undefined subroutine &main::func1 called at MyScript.pl line 10</code>
<p>Line 10 is:</p>
<code>print func1(@list),"\n";</code>
<p>after typing "use Test;"</p>
<p>What am I missing here? Also, is the BEGIN command supposed to be used in the Perl script? It gives syntax errors when I try to use it.</p>
<p>Thanks in advance,</p>
<p>Gideon</p>
102347
102347
3