in reply to problem with CGI

Passing information to a script goes like this:

link: http://xxx.com/cgi-bin/test.cgi?key1=value1&key2=value2

Then the script can read it using the CGI.pm module:
#!/usr/bin/perl -w use strict; use CGI; my $cgi = new CGI; print $cgi->param('key1'); ### prints: value1 print $cgi->param('key2'); ### prints: value2

Replies are listed 'Best First'.
Re: Re: problem with CGI
by b1rd (Novice) on Sep 30, 2003 at 13:23 UTC
    thank you,

    could I use as value1 perl variable e.g. $test?
    because this variable stores value of IP address which I want to display. if no how could I do this?

    thanks

      b1rd you could easily pass $test, if you want everyone to see it like this:

      print "<a href=\'http://www.foobar.com?${test}\'>\n";

      but I would recommend you read Ovid's course and esp. Part 4 which talks about encription.

      Update: Changed & to ?

      "Pain is weakness leaving the body, I find myself in pain everyday" -me