(The one that doesn't work...see [Stranger and Stranger...])

(Begin /cgi-bin/printnode4.pl) #!/usr/bin/perl #Printnode version 4 #Called from basedir/cgi-bin #options: ?node=x #result prints basedir/nodes/x if exists and is arg #or basedir/err404loc if not #or basedir/nodes/$nonodespec if no arg named node #(C) me 1999 $nonodespec = "default.html"; $err404loc = "404.html"; $data_from_get_method = $ENV{'QUERY_STRING'}; # break up the answer into field value pairs @GET_FIELD_PAIRS = split(/&/,$data_from_get_method); # determine the exact name and value for each pair foreach $pair (@GET_FIELD_PAIRS) { # split field name from value on = ($field_name, $field_value) = split (/=/, $pair); # translate '+' to ' ' --- convert + back to spaces $field_value =~ tr/+/ /; # translate string in place # decode the &nn values $field_value =~ s/%([a-fA-F0-9][a-f-A-F0-9])/pack("C",hex($1))/eg; # put all of the values into an associative array # for use later $GETFORMDATA{$field_name} = $field_value; } #set nodedisp to $GETFORMDATA("node") and read file into $data #or default if none if (defined $GETFORMDATA{"node"}) { $nodedisp= $GETFORMDATA{"node"}; } else { $nodedisp= $nonodespec; } my $baquux= join "", "../nodes/$nodedisp"; if ( -e $baquux) {