
monocle
User
Jun 1, 2000, 12:23 PM
Post #2 of 5
(420 views)
|
No promises but try this rewrite to your script. If you pre load the $goto with the error.html and the script does not find a replacement for this, the user will be sent to the error.html. <BLOCKQUOTE><font size="1" face="Arial,Helvetica,sans serif">code:</font><HR> #!/usr/bin/perl require("cgi-lib.cgi"); &ReadParse; $goto = "http://www.whatever.com/error.html"; open(FILEHANDLE,"<zipdata.list"); while($line = <FILEHANDLE> ){ $line =~ s/\n//g; ($product,$url) = split(/\|/, $line); if($product eq $in{'jump'}){ $goto = $url; last; } } close FILEHANDLE; print "Location: $goto\n\n"; exit; </pre><HR></BLOCKQUOTE> Monocle Hear techno music by Monocle at http://www.mp3.com/monocle [This message has been edited by monocle (edited 06-01-2000).]
|