in reply to Using subroutine between scripts

# Create a module with the subroutine(s) you want to share package MyLibrary; sub func_1 { ... } # ------------------------------------------------- 42 # non-zero indicates successful loading of module # ------------------------------------------------- # then in your cgi script: use lib '.'; use MyLibrary; print MyLibrary::func_1( @args );

--
TTTATCGGTCGTTATATAGATGTTTGCA

Replies are listed 'Best First'.
Re: Re: Using subroutine between scripts
by chriso (Sexton) on Nov 10, 2003 at 14:06 UTC
    Thanks for your input. In the script you said:

    use lib '_';

    What is this statement? Are you using it as an example and I should replace the _ with something?

    Thanks.