Bare in mind that I am still a beginner at coding. Why is it "good practice" to create an object when using CGI, rather than just diving in?

For example:

use CGI ':standard';
my $q=new CGI;
my $input=$q->param('input');

and

use CGI ':standard';
my $input=param('input');

both put the contents of 'input' into $input and the last one has less lines and less opportunity for typos, but the first is better practice than the second. Gently, please; why?

Dave


-- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]



Reply via email to