in reply to Re^3: Program for Windows and Unix
in thread Program for Windows and Unix

Thank you!
require is working!

Replies are listed 'Best First'.
Re^5: Program for Windows and Unix
by ig (Vicar) on Feb 28, 2009 at 05:18 UTC

    Note that 'require' does not run the 'import' method of the module. You may have to call import() yourself for some modules.

    Note also that if you require the module at runtime it will be too late to run any CHECK or INIT blocks in the module, so they will not be run. Some modules depend on these blocks being run. You can put the code to load the module in a BEGIN block to ensure it is run at compile time and that CHECK and INIT blocks are run.