in reply to Initializing a script from an INI-file using BEGIN-block

Sharing code between projects is always good. Cut and paste is not a good way to share code, though.

perlmod gives advice on writing modules.

If this code were executed by the sub import of a module MyInit.pm which you wrote, then the following code would be all that each little script would need.

use MyInit;

--
[ e d @ h a l l e y . c c ]

Replies are listed 'Best First'.
Re^2: Initializing a script from an INI-file using BEGIN-block
by martinvi (Monk) on Mar 04, 2005 at 10:31 UTC

    I want to thank you and Taulmarill. This was a very good advice.

    I've put the code into a module -- even an object-oriented one ;-) -- and it works very fine.