in reply to Re: How to include a large number of constants?
in thread How to include a large number of constants?

I tried using "do 'g1.inc';" but I get the same results as require with the bareword warning...
  • Comment on Re^2: How to include a large number of constants?

Replies are listed 'Best First'.
Re^3: How to include a large number of constants?
by BrowserUk (Patriarch) on Apr 27, 2005 at 21:35 UTC

    For the constant subs to be recognised as such when the code that calls them is compiled, you'll need to put the do in a BEGIN{} block.

    BEGIN{ do 'gi.inc'; }

    Examine what is said, not who speaks -- Silence betokens consent -- Love the truth but pardon error.
    Lingua non convalesco, consenesco et abolesco.
    Rule 1 has a caveat! -- Who broke the cabal?