#!/usr/bin/perl # no warnings #!/usr/bin/perl -w # warnings enabled #### #!/usr/bin/perl -w @all = split(/?/,$ENV{'HTTP_REFERER'}); $where = @all[1]; die $where; #### A) http://www.host.com/cgi-bin/test-script.pl B) http://www.host.com/cgi-bin/test-script.pl?param=value C) http://www.host.com/cgi-bin/test-script.pl?param=value&color=blue 1: #!/usr/bin/perl -w 2: 3: warn $ENV{'QUERY_STRING'}; Line 3 returns: A) blank (null string, no data) B) param=value C) param=value&color=blue #### #!/usr/bin/perl -w use CGI; use strict; my $cgi = new CGI; # this creates a new CGI object my $where = $cgi->param('where'); warn $where; #### /cgi-bin/locator.pl?where=Front