"I would also be interested in a stern talking to if the idea of global scalars for all 12 of the scalars used frequently in file1 would be considered an bad idea."

Global variables are indeed something to be avoided, but i think it is okay to break this rule as long as you understand why first. When i was an undergraduate, my classmates and myself were forced to avoid them. Relying on global variables is a bad habit theorectically, but realistically, they have been proven to be prone to producing pasta code.

Now, in your case i would turn those 12 scalars into one global array:
# file1.pl our @angry_men = qw( Balsam Fiedler Cobb Marshall Klugman Binns Warden Fonda Sweeney Begley Voskovec Webber );
or one global hash:
our %diamond = ( 'Koh-i-Noor' => 186, Cullinan => 3106, Excelsior => 995.2, 'Star of Africa' => 520.20, 'Great Mogul' => 793, Orloff => 300, "Idol's Eye" => 70.2, Regent => 410, 'Blue Hope' => 45.52, Sancy => 55, 'Taylor-Burton' => 69.42, Hortensia => 20, );
And then you need only declare that variable once in each script that needs it:
require '/full/path/to/file1.pl'; our @angry_men; our %diamond; # then later ... print $diamond{Cullinan}; $some_var = $angry_men[7];
More than likely you will want a hash (a good name is %conf), but sometimes an array makes more sense. Good luck. :)

jeffa

L-LL-L--L-LL-L--L-LL-L--
-R--R-RR-R--R-RR-R--R-RR
B--B--B--B--B--B--B--B--
H---H---H---H---H---H---
(the triplet paradiddle with high-hat)

In reply to Re: Sharing the scalar love? by jeffa
in thread Sharing the scalar love? by jcpunk

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.