in reply to Trying to load other perl scripts use() or require()

Make sure your module returns a true value. The last line should be something like: 1;

gav^

Replies are listed 'Best First'.
Re: Re: Trying to load other perl scripts use() or require()
by dpuu (Chaplain) on Jul 21, 2002 at 05:16 UTC
    The value of any block in Perl is the result of the last statement in that block. If a block is a subroutine, then the result of the subroutine is the result of the block. You can use a "return" statement to exit the sub before the end; and at the end of the sub to be explicit about your intent. Modules are blocks. (Strangely, this doesn't apply to scripts: you have to use exit($value) to return a value from a script.) --Dave.
Re: Re: Trying to load other perl scripts use() or require()
by Anonymous Monk on Jul 21, 2002 at 05:11 UTC
    ty I dont remeber reading this in my book. so 1 is just like return(1);