Do you know where your variables are? | |
PerlMonks |
Re: calling a perl file from a perl scriptby j3 (Friar) |
on Apr 06, 2007 at 20:37 UTC ( [id://608754]=note: print w/replies, xml ) | Need Help?? |
Hi hodashirzad, As jonadab says, writing your own modules is very likely the way to go. Happily, with Perl, easy things tend to be easy, and writing modules (i.e., sticking your functions in .pm files) is a walk in the park. :) I believe many folks create their own ~/perllib directory, and drop their modules (ex. MyModule.pm) in there. In your main script code, you tell perl how to find them by putting use lib '/home/you/perllib'; at the top (before the use MyModule; line). Edit: To get started, have a look in the Tutorials section of this site, paying special attention to Simple Module Tutorial.
In Section
Seekers of Perl Wisdom
|
|