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

[no subject]



The preferred way would be to write a module (man perltoot) and have all
of your common code in that.  Then your programs would
use MyModule;

Alternatively, just stick the common code in a file and
require '/full/path/to/file.pl';

That covers both questions, unless the first one was "I want to write a
program that outputs perl code, and include that in my other program" in
which case you want a combination of eval, backticks, and require.  Or a
temp file.  But I don't think that's what you meant, anyway.

-- 
michael d. ivey        [McQ] : "The power of accurate observation is
   <ivey at gweezlebur.com>     : commonly called cynicism by those who
<a  rel="nofollow" href="http://gweezlebur.com/~ivey/";>http://gweezlebur.com/~ivey/</a> : have not got it.&quot;
 encrypted email preferred   :                   -- George Bernard Shaw


</pre>
<!--X-Body-of-Message-End-->
<!--X-MsgBody-End-->
<!--X-Follow-Ups-->
<hr>
<ul><li><strong>Follow-Ups</strong>:
<ul>
<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-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>
</ul></li></ul>
<!--X-References-End-->
<!--X-BotPNI-->
<ul>
<li>Prev by Date:
<strong><a href="msg00033.html">[ale] Perl Question</a></strong>
</li>
<li>Next by Date:
<strong><a href="msg00035.html">[ale] Perl Question</a></strong>
</li>
<li>Previous by thread:
<strong><a href="msg00033.html">[ale] Perl Question</a></strong>
</li>
<li>Next by thread:
<strong><a href="msg00035.html">[ale] Perl Question</a></strong>
</li>
<li>Index(es):
<ul>
<li><a href="maillist.html#00034"><strong>Date</strong></a></li>
<li><a href="threads.html#00034"><strong>Thread</strong></a></li>
</ul>
</li>
</ul>

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