in reply to Re: including another perl file
in thread including another perl file

require only loads once and this WILL bite in any persistent environment.
$ echo 'print 1;' > test.pl $ perl -le'{ local %INC; require "test.pl" } require "test.pl";' 1 1
Update: that should be local %INC = %INC; in fact.

Makeshifts last the longest.

Replies are listed 'Best First'.
Re: Re^2: including another perl file (dynamic scoping)
by Juerd (Abbot) on Jun 03, 2003 at 05:28 UTC

    local %INC;

    Good point, but I don't think many people will remember to do that :)

    Juerd # { site => 'juerd.nl', plp_site => 'plp.juerd.nl', do_not_use => 'spamtrap' }