[Date Prev][Date Next][Thread Prev][Thread Next] [Search] [Date Index] [Thread Index]

[MacPerl] Very simple question



	I want to put a subroutine in a library which I create.  I create a
file 'ill.pm' which I put in a folder named 'myMacPerl_library'. The file
'ill.pm' contains:
package ill;
sub say_hello {
   print "hello world!\n";
}

	I add the path to the folder 'myMacPerl_library' to the paths to
search for library modules.

	I then try to access 'say_hello()' from a new Perl script.  It
should be easy, but I can't seem to do it.  I tried a number of things
without success.  For example,

'use myMacPerl_library::ill();'

	This gives the syntax error, "myMacPerl_library/ill.pm did not
return a true value".

	What is the correct way to go about this?

	Paul
--
Paul Schatz
Chem Dept
University of Virginia

# ===== Want to unsubscribe from this list?
# ===== Send mail with body "unsubscribe" to macperl-request@macperl.org