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;

    use CGI qw(:standard);

    my $user = param('user') || 'system';
    my $book = param('book') || 'index';
    my $page = param('page') || 0;

    # rest of program 


> In case, I am assuming user's query will be :
> 1. http://whatever.tld/cgiDir/
> 2. http://whatever.tld/cgiDir/?username
> 3. http://whatever.tld/cgiDir/?username.bookname
> 4. http://whatever.tld/cgiDir/?userName.bookName&p=pageNum <- PageNum
> is an integer of cause 

You should stick to the standard (which CGHI.pm understands), not invent 
your own:

    http://whatever.tld/cgiDir/program_name?user=auser;book=abook;page=12

where program_name is the name of your script.

-- 
felix

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

Reply via email to