#!/usr/bin/perl # # navigate.pl # version 961117 # copyright 1996 by bo larsson # all rights reserved # # bugs or feedback to bliss@seagull.net # for information on how to use, visit http://www.seagull.net/bliss/ #
# # # # #
# # Take me to # # $ten_twenty = ""; # Get the input and strip off all unwanted characters read(STDIN, $buffer, $ENV{'CONTENT_LENGTH'}); $temp = $buffer; $temp =~ s/\+/ /g; $temp =~ s/%([0-9|A-F]{2})/pack(C,hex($1))/eg; # Store the matching name and value pairs foreach (split(/&/,$temp)) { ($NAM, $VAL) = split(/=/, $_); $DATA{$NAM} = $VAL; $valist .= "$NAM=$VAL\n"; } # Grab necessary variable $where = $DATA{'where'}; foreach (split(/\n/,$valist)) { ($the_place,$the_url) = split(/=/, $_); if ($where eq $the_place) { $ten_twenty = $the_url; } } if ($ten_twenty ne "") { print("location:$ten_twenty\n\n"); } else { print "Content-type: text/plain\n\n"; print "You want to go somewhere I don't understand!"; }