The short answer: you should be
doing "libraries/somelib.pl" rather than
requireing it. Reading over the docs for
do (specifically,
do EXPR, not
do BLOCK... they are (sadly) not very closely related) and
require would probably be a good idea, but the executive summary is:
require will only execute it the first time it is seen in a perl process (because the expectation with
require and
use is that the file is a "package" or "module" and things are either
exported or referred to by namespace... they don't have to be defined anew in each
require-er).
Of course, you could also go the better route, and turn "libraries/somelib.pl" into a real module, and use it... but that will be more work (probably worth it, though).
------------
:Wq
Not an editor command: Wq