Importing the symbols into :: or main:: is exactly what I want (there is no package). The script I'm aiming for has zero-configuration, i.e. all the stuff that can change is set in a cfg file that is held within a sandbox controlled under CVS, which I'm do'ing". Most of these variables need to be in global (or in package, if there was one) scope, as they need to be read by most of the subroutines in main. Ideally what I want is #include "import.pl" but for reasons in the article above this isn't really there, unless you do some funky odd looking stuff with the DB module. I'd rather avoid funky odd looking stuff for this software as lots of people need to use and understand it. I do find it odd that an old C-coder like Larry W would choose not to give people the ability to #include. Someone alluded to the idea that do'ing a file is kinda unsafe - presumably because you could be sucking up any old kind of stuff there which could break the main program? But I think I'm right in saying that unless the main program has use $variable then having the same in the file which is done then the symbol will not be put into :: or main::? I've thought of writing modules and so forth here, but then I truly get into different lexical scopes, which I'm trying to avoid for simplicity sake. (Read simplicity=50% laziness , 50% easy for non-perlers to understand). Thanks, dch.

In reply to Re^4: strict/do question by dch
in thread strict/do question by dch

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.