in reply to CGI Help

with this code snippet $q is set to "new CGI" is this just laying the ground work for the html part of the script that is running?
my $q = new CGI; is syntactically equivalent to my $q = CGI->new; It creates a CGI object and stores it in $q, and all methods are called on that object. See perlobj for more details.

#11929 First ask yourself `How would I do this without a computer?' Then have the computer do it the same way.

Replies are listed 'Best First'.
Re^2: CGI Help
by GrandFather (Saint) on Feb 10, 2016 at 20:32 UTC

    The OP should note that the new CGI (indirect syntax) variant is discouraged because it can be confusing to read by both humans and the interpreter.

    Premature optimization is the root of all job security