Calling Subroutines in CGI
i am working on a basic PERL CGI script and i am using a subroutine called "guestbook" using
&guestbook
'
i can execute the subroutine.
but i was wondering how do i access the subroutine via the browser??
i am working on a basic PERL CGI script and i am using a subroutine called "guestbook" using
&guestbook
'
i can execute the subroutine.
but i was wondering how do i access the subroutine via the browser??
eBlush_Hector posted this at 02:24 — 3rd April 2004.
He has: 51 posts
Joined: Jan 2004
To call the script, you can reference it by url:
.. .com/cgi-bin/yourscriptname.cgi
In the script you call your subroutine.
However, you can read about it in more detail at
http://www.cgi101.com/book/ch1/text.html
Let us know how it turns out!
Hector
http://www.eblush.com/
Where you can get personal, online!
NEW: Honor your heroes at ThisIsMyHero.com!
CJay posted this at 22:15 — 4th April 2004.
They have: 10 posts
Joined: Feb 2004
what im after actually is to be able to process a small part of my script for example if i type mysite.com/cgi-bin/scriptname.cgi?admin if displays a different thing compared to if i type mysite.com/cgi-bin/scriptname.cgi
eBlush_Hector posted this at 23:53 — 4th April 2004.
He has: 51 posts
Joined: Jan 2004
You need a module like CGI.pm
Take a look at http://search.cpan.org/dist/CGI.pm/
It will allow you to do what you're after.
[This is covered in the link I first gave you!]
http://www.eblush.com/
Where you can get personal, online!
NEW: Honor your heroes at ThisIsMyHero.com!
Want to join the discussion? Create an account or log in if you already have one. Joining is fast, free and painless! We’ll even whisk you back here when you’ve finished.