Anonymous Monk has asked for the wisdom of the Perl Monks concerning the following question:

I want to send a variable to a perl script with html like <a href="www.webpage.com?uid=4">Link name</a> how do I get the variable with the perl script

Replies are listed 'Best First'.
Re: Getting a variable
by Anonymous Monk on Feb 17, 2000 at 10:07 UTC
    Use the CGI module:
    use CGI; my $q = new CGI; my $uid = $q->param('uid');
Re: Getting a variable
by Anonymous Monk on Feb 17, 2000 at 10:07 UTC
    Use the CGI module:
    use CGI; my $q = new CGI; my $uid = $q->param('uid');
RE: Getting a variable
by mbreyno (Initiate) on Feb 17, 2000 at 09:21 UTC
    I use this method:
    # split the "id=xxx" part of the view URL @query = split /=/, $ENV{'QUERY_STRING'}; $uid = $query[1];
    Although it looks like you might be meaning to call it as:
    <a href="http://www.webpage.com/script.pl?uid=4">Link name</a>
    Let me know if you have any questions. ---Mike ------------------------------------------------------- Michael Reynolds <michael@spinweb.net> SpinWeb Net Designs, Inc. - http://www.spinweb.net Voice: 765.215.7063 - Fax: 603.843.1376 -------------------------------------------------------