![]() |
|
There's more than one way to do things | |
PerlMonks |
Re: CGI.pm OO vs. FOby kutsu (Priest) |
on Sep 09, 2005 at 20:41 UTC ( #490747=note: print w/replies, xml ) | Need Help?? |
I'd use OO when your going to need to call multiple params at different times/different lexical scopes (the creation of a global cgi variable to control when and where you need certain params), something like the code that follows:
There are other ways to do this, but having seen your whole script this looks like a good stepping point. As for your actually code Vars returns a hash while param returns an array (or scalar depending on how it's called) so if you use $cgi->Vars you should use $where .= "$_" for values %IN; (if you have multiple locations from checkboxes you want param as Vars will combine locations into a single string) Update: Replied to CB questions and sql creation explaination: "Cogito cogito ergo cogito sum - I think that I think, therefore I think that I am." Ambrose Bierce
In Section
Seekers of Perl Wisdom
|
|