Like the good monks have been telling you, use a templating system like HTML::Template and a lot of your issues will dissolve away. Get the HTML out of your CGI. It's sooooo much easier.
—Brad "The important work of moving the world forward does not wait to be done by perfect men." George Eliot
| [reply] |
Remove the exit statement or you won't even be able to use the module. also, I'd STRONGLY suggest using strict, lexical variables and pass the values as function arguments instead of relying on vars that are declared (or not) SOMEWHERE else.
then do something like:
use ModuleName;
# ...
pageNumbers($total_pages,$matches,$total_records_page, @and_whatever_o
+ther_variables_you_need);
| [reply] [d/l] |
Don't forget that using abbreviations like "o/p" can be confusing to readers who aren't sure what they mean especially in this case when I believe you actually meant G.O. (Kidding!)
| [reply] |