Home : General : Perl Programming :

General: Perl Programming: Re: [perlman] How to use ?: Edit Log

Here is the list of edits for this post
Re: [perlman] How to use ?
Depending on your "newbiness" you may wish to use $ENV{QUERY_STRING} instead of jumping in with CGI.pm

Heres a basic example script:

Code:
#!/usr/bin/perl

print "Content-type: text/html\n\n";

if ($ENV{QUERY_STRING} eq 'aboutme') {
&aboutme;
}
else {
&main;
}

sub main {
print "This is the main sub";
}

sub aboutme {
print "This is the about me sub";
}

Then you can use script.cgi?aboutme


Last edited by:

RedRum: Nov 3, 2001, 1:58 PM

Edit Log: