Bliako, thank you. While some here seem bent on forcing me into their mold, or just writing me off and voting me down, you have gone the extra mile to give me a truly useful set of suggestions. While I appreciate the time you spent on all of it, I will likely only be able to implement your first suggestion--that of putting variables into a package and calling that. THAT is something I never knew was possible before, and that sounds like a perfect solution in my use case. I wonder why no one else does it this way or bothered to suggest this possibility. Thank you so much!

Really, I wish I could do OO programming. I've tried. I've read the chapters on it in "Programming Perl" (Third edition) multiple times, and have made attempts at using it, only to meet with total failure. My syntax errors simply follow my general lack of understanding. It's always been above me. Perhaps if I had an excellent teacher who could once explain it for me in a way that made sense to me, it might be different--but, just like math, the typical case is that the teacher has almost a language and logic of his/her own--one that is too esoteric for many minds. I have managed to use the my $something = $cgi->param('something'); method from the CGI module, but many other modules are too hard for me to grasp. When one needs to start escaping or doubling the "funny characters" in front of the variables, or start using those "->" references, that's usually where I get lost--I no longer have any idea when to use which form.

But I think I will put that Variables.pm file to practice shortly! (I'd always put all of that at the top of my main script, but it makes a large chunk of material to have to scroll past every time I want to navigate between the required/used files and the code.)

Blessings,

~Polyglot~


In reply to Re^2: How to import "global" variables into sub-scripts from main script? by Polyglot
in thread How to import "global" variables into sub-scripts from main script? by Polyglot

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.