XP is just a number | |
PerlMonks |
Re^2: How to call counter.pl script from another scriptby Nik (Initiate) |
on Feb 22, 2008 at 16:39 UTC ( [id://669598]=note: print w/replies, xml ) | Need Help?? |
I'will follow your advice and try to use my first perl module then! I understand for the link you gave that in order to use this 'counter.pm' module within my index.pl file i have to use 'use counter.pm' right? Here is the code i written inside counter.pm What i dont know is how to pass the variables $db, $pagename, $host inside the counter.pm module because those 3 variables are a prerequisite for the module to perform its task. Also the counter.pm module will have to return the variables $counter back to index.pl script so i can print it in the following line of index.pl Please excuse me as this is the first time im trying to use modules. ps. Do i need to put the above code in a sub inside counter.pm or creating a sub inside counter.pm isnr neccesary?
In Section
Seekers of Perl Wisdom
|
|