[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[no subject]



You want require:

-------
data.pl:
$foo = "bar";
$baz = "quux";
-------
program.pl:
require "/path/to/data.pl";
do_something_with($foo,$baz);
-------

require demands that a library file be included if it hasn't already
been included.  The file is included via the do-FILE mechanism, which is
essentially just a variety of "eval".

See 'perldoc -f require' for details.

If you were doing OO perl, you'd just make a module that exported your
constants, say MyApp::Constants, and then
use MyApp::Constants;
and they'd be exported into your namespace.

-- 
michael d. ivey        [McQ] : "For technical reasons, there will be
   <ivey at gweezlebur.com>     : no Tuesday next week."
<a  rel="nofollow" href="http://gweezlebur.com/~ivey/";>http://gweezlebur.com/~ivey/</a> :                               -- unknown
 encrypted email preferred   :


</pre>
<!--X-Body-of-Message-End-->
<!--X-MsgBody-End-->
<!--X-Follow-Ups-->
<hr>
<ul><li><strong>Follow-Ups</strong>:
<ul>
<li><strong><a name="00050" href="msg00050.html">[ale] Perl Question</a></strong>
<ul><li><em>From:</em> cfowler at outpostsentinel.com (Chris Fowler)</li></ul></li>
</ul></li></ul>
<!--X-Follow-Ups-End-->
<!--X-References-->
<ul><li><strong>References</strong>:
<ul>
<li><strong><a name="00022" href="msg00022.html">[ale] Perl Question</a></strong>
<ul><li><em>From:</em> bkruger at mindspring.com (Bob Kruger)</li></ul></li>
<li><strong><a name="00025" href="msg00025.html">[ale] Perl Question</a></strong>
<ul><li><em>From:</em> fletch at phydeaux.org (Fletch)</li></ul></li>
<li><strong><a name="00033" href="msg00033.html">[ale] Perl Question</a></strong>
<ul><li><em>From:</em> cfowler at outpostsentinel.com (Chris Fowler)</li></ul></li>
<li><strong><a name="00034" href="msg00034.html">[ale] Perl Question</a></strong>
<ul><li><em>From:</em> ivey at gweezlebur.com (michael d. ivey)</li></ul></li>
<li><strong><a name="00035" href="msg00035.html">[ale] Perl Question</a></strong>
<ul><li><em>From:</em> cfowler at outpostsentinel.com (Chris Fowler)</li></ul></li>
</ul></li></ul>
<!--X-References-End-->
<!--X-BotPNI-->
<ul>
<li>Prev by Date:
<strong><a href="msg00036.html">[ale] Two SSH access questions</a></strong>
</li>
<li>Next by Date:
<strong><a href="msg00038.html">[ale] Two SSH access questions</a></strong>
</li>
<li>Previous by thread:
<strong><a href="msg00035.html">[ale] Perl Question</a></strong>
</li>
<li>Next by thread:
<strong><a href="msg00050.html">[ale] Perl Question</a></strong>
</li>
<li>Index(es):
<ul>
<li><a href="maillist.html#00037"><strong>Date</strong></a></li>
<li><a href="threads.html#00037"><strong>Thread</strong></a></li>
</ul>
</li>
</ul>

<!--X-BotPNI-End-->
<!--X-User-Footer-->
<!--X-User-Footer-End-->
</body>
</html>