Hey,
I am trying to use a module which I have created but I can't seem to run it. I have done a perl -wc tester.pl and was told both the module and script syntax is fine. The script and the module are real simple:
tester.pl :
#!/usr/local/bin/perl
#this is a script to test the moveordel perl module
use mmroutines;
use Sample;
print "Before sub\n";
set_mm_system_vars();
APrint ();
print "After sub\n";
exit;
and Sample.pm:
#!/usr/local/bin/perl
sub APrint
{
print "This is a perl module\n";
}
the set_mm_system_vars() works no problem, but when trying to run tester.pl I receive the output:
Sample.pm did not return a true value at ./tester.pl line 6.
BEGIN failed--compilation aborted at ./tester.pl line 6.
Any ideas?
Miah
I am trying to use a module which I have created but I can't seem to run it. I have done a perl -wc tester.pl and was told both the module and script syntax is fine. The script and the module are real simple:
tester.pl :
#!/usr/local/bin/perl
#this is a script to test the moveordel perl module
use mmroutines;
use Sample;
print "Before sub\n";
set_mm_system_vars();
APrint ();
print "After sub\n";
exit;
and Sample.pm:
#!/usr/local/bin/perl
sub APrint
{
print "This is a perl module\n";
}
the set_mm_system_vars() works no problem, but when trying to run tester.pl I receive the output:
Sample.pm did not return a true value at ./tester.pl line 6.
BEGIN failed--compilation aborted at ./tester.pl line 6.
Any ideas?
Miah