in reply to Re: Redirect and using CGI constructor
in thread Redirect and using CGI constructor

sorry i forgot to add I did have a place where value is declared:
my $subject = param('subject');
Also the
my $query = CGI->new();
$query is an instance of the CGI contstructor and/or is it a reference to CGI constructor?

Replies are listed 'Best First'.
Re: Re: Re: Redirect and using CGI constructor
by EvdB (Deacon) on Nov 17, 2003 at 16:11 UTC
    If you really want to know:

    $query is a reference to a hash, and this hashref is blessed into the class CGI. Try running this one liner:

    perl -e 'use CGI; $cgi = CGI->new; print $cgi, "\n\n";'

    The CGI->new() is simply a way of saying run the method 'new' of the module 'CGI'. This method returns the blessed hashref above.

    This can all get really confusing in the beginning, try perldoc perltoot for a fairly nice introduction.

    --tidiness is the memory loss of environmental mnemonics

      Thanks EvdB!
        A pleasure. Don't be anonymous, come in and know us better.

        --tidiness is the memory loss of environmental mnemonics