On Sat, 2005-11-26 at 19:48 -0800, Lou Hernsen wrote: > I am studying modules..
perldoc perlmod (and perlmodlib, and perlmodstyle) > Do I need to pass vars into the mod? No, but you might need to pass them into subroutines you define in the module (depending on what you want to do). > Do i need to declare vars in the mod? That depends on what you want the module to do. > What is "our"? something like "my" and "local"? perldoc -f our > Do I need to return vars? The module itself needs to return a true value, this is usually achieved by sticking "1;" at the end of it. Your subroutines may or may not return variables depending on what you want them to do. > The code I am writing creates part of a web page, > so I can print it in the mod or in the main. > (I wold prefer to print it in the mod.. if possible) Its possible, but I find that building a data structure that represents the page, then dropping it into a template (using Template-Toolkit of HTML::Template) makes things more manageable. -- David Dorward <http://dorward.me.uk/> "Anybody remotely interesting is mad, in some way or another." -- The Greatest Show in the Galaxy -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] <http://learn.perl.org/> <http://learn.perl.org/first-response>