in reply to Redirect and using CGI constructor
The calling convention of my $query = CGI->new(); is generally prefered, your way (my $query = new CGI;)is deprecated.use CGI; use strict; my $query = CGI->new(); my $subject = $query->param( 'subject' ); unless( defined $subject && $subject ) { ...
You should test that subject is both defined and that it has some value, as $subject = '' is defined but probably not what you want. You might want a regex like $subject =~ m/\w+/;to test that there are some characters in subject at the very least.
My question is $query an object instance of new CGI constructor? $query is now an instance of the CGI object and so it allows you access to the CGI modules methods.
--tidiness is the memory loss of environmental mnemonics
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Re: Redirect and using CGI constructor
by Anonymous Monk on Nov 17, 2003 at 16:03 UTC | |
by EvdB (Deacon) on Nov 17, 2003 at 16:11 UTC | |
by Anonymous Monk on Nov 17, 2003 at 16:27 UTC | |
by EvdB (Deacon) on Nov 17, 2003 at 16:32 UTC |