On Jun 21, Connie Chan said:
>Why CGI.pm ? What difference ? =)
Because CGI does it right. It's easy to do it wrong. Very wrong, very
easily.
--
Jeff "japhy" Pinyan [EMAIL PROTECTED] http://www.pobox.com/~japhy/
RPI Acacia brother #734 http://www.perlmonks.org/ http://www.cpan.
on Thu, 20 Jun 2002 20:37:32 GMT, Connie Chan wrote:
> Why CGI.pm ? What difference ? =)
Because it already contains all logic to parse *all* standards conforming
query-strings, not only your special case.
Soon you may want to work with an html-form instead of appending the query
string to a U
Why CGI.pm ? What difference ? =)
- Original Message -
From: "Felix Geerinckx" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Friday, June 21, 2002 1:54 AM
Subject: Re: Would it be simpler ?
> on Thu, 20 Jun 2002 17:27:35 GMT, Connie Chan wrote:
>
&g
Thanks a lot Japhy, that's exactly the key I want =)
Assign the value at first, replace it when match...
That's very great !!!
Smiley Connie =)
>
> sub getQuery {
> my %ret = (
> user => 'system',
> book => 'index',
> page => 0,
> );
>
> my $query = shift or ret
On Jun 21, Connie Chan said:
>sub getQuery {
> my $queryStr = @_; my %ret;
You mean:
my ($queryStr) = @_;
or
my $queryStr = shift;
or
my $queryStr = $_[0];
> if (! $queryStr) { $ret{user} = 'system' ; $ret{book} = 'index' ; $ret{page} =
>0 }
> else {
>( $ret{user}, $ret
on Thu, 20 Jun 2002 17:27:35 GMT, Connie Chan wrote:
> Hi all, I am now making a bookshelf program with perl.
> At this very beginning, I do wonder if the below script
> can be simpler or not...
>
> [code snipped]
Please don't do this: use CGI.pm instead:
#! perl -w
use strict;
Hi all, I am now making a bookshelf program with perl.
At this very beginning, I do wonder if the below script
can be simpler or not...
sub getQuery
{my $queryStr = @_; my %ret;
if (! $queryStr) { $ret{user} = 'system' ; $ret{book} = 'index' ;
$ret{page} = 0 }
else