in reply to Passing Variables in CGI

The easiest way is to pass the information via a querystring.
ie. http://hostname/perl/script?a=b&c=d etc.
or in a form.
<form action="/perl/scriptname" method="post"> <input type="text" name="a" value=""> <input type="submit" value="Submit"> </form>
To retrieve the values it's easiest to use CGI.pm like the following.
use CGI; my $q = CGI->new(); my $a = $q->param('a');
There are many ways to retrieve values. This is the easiest one for me, others may have their own opinion.
There is a lot more you can do with CGI.pm so read the documentation on it.

Replies are listed 'Best First'.
(Ovid) RE(2): Passing Variables in CGI
by Ovid (Cardinal) on Jul 25, 2000 at 00:55 UTC
    Slight problem in your post. If you wish to pass parameters in the URL, your method should be get, not post. You can still append data to the URL and it will be processed with get, but your post does not make that clear. Here's the correct form tag:
    <form action="/perl/scriptname" method="get">
    Cheers,
    Ovid