I am receiving "/home/users/me/foo.pl did not return a true value at ./program1.pl at line 2" where line 2 is the "require". Any ideas?
-----Original Message----- From: Wiggins d Anconia [mailto:[EMAIL PROTECTED] Sent: Friday, July 09, 2004 1:24 PM To: BOLCATO CHRIS (esm1cmb); [EMAIL PROTECTED] Subject: Re: Help with "use" > > Hello all, > Can "use" be used in a sub routine that is kept external? > Ex. > Program 1. > > #!/bin/perl > require '/home/users/me/foo.pl'; > exit; > > > Foo.pl > > sub bar { > use strict; > use fcntl; > use AnyDBM_File; > } > Did you try it? Did it return an error? Note that 'require' is runtime, but 'use' is compile time, except when the 'use' happens in a 'require' I suspect, in which case it is at compile time at the point of the require. Also note that 'strict' is a pragma rather than normal module. And what is fcntl? http://danconia.org -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] <http://learn.perl.org/> <http://learn.perl.org/first-response>