Please bottom post.... > I added > 1; > Inside sub foo and it didn't work, but I just added it to the end of foo.pl > and it worked! > I don't get it?
Inside 'foo' the 1 becomes the return value of the subroutine when it is called, at the end of the foo.pl library it becomes the return value of loading the library. Whether 'foo' the sub returns 1, true/false, nothing, etc. matters only from your API perspective, whether foo.pl returns true matters to the Perl interpreter, aka was it able to load the library, which is why it was causing the error when it "couldn't" (aka it thought it couldn't because it didn't return true). > But thanks. > Makes sense? http://danconia.org > -----Original Message----- > From: Bob Showalter [mailto:[EMAIL PROTECTED] > Sent: Friday, July 09, 2004 1:49 PM > To: BOLCATO CHRIS (esm1cmb); [EMAIL PROTECTED] > Subject: RE: Help with "use" > > > BOLCATO CHRIS (esm1cmb) wrote: > > It doesn't seem to be foo.pl that is causing the error is seems to be > > coming from "use AnyDBM_File;" > > Why do you say that? > > > Could this be? That AnyDBM_File doesn't return a true vlaue? > > Did you add > > 1; > > To the end of foo.pl? You need to. > > -- > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > <http://learn.perl.org/> <http://learn.perl.org/first-response> > > > -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] <http://learn.perl.org/> <http://learn.perl.org/first-response>