#!/usr/local/bin/perl if ($ENV{'REQUEST_METHOD'} eq "GET") { $inputString = $ENV{'QUERY_STRING'}; } else { $inputString = ; } printTop(); $inputString =~ s/%(..)/pack("c",hex($1))/ge; $inputString =~ s/\+/ /g; @inputString = split(/\&/, $inputString); for($i=0; $i<=$#inputString; $i++) { ($name,$value) = split(/=/, $inputString[$i]); $selectedFoodItem{$name} = $value; } chomp $selectedFoodItem{'selected'}; #chop $selectedFoodItem{'selected'}; if($selectedFoodItem{'selected'} =~ /noModify/) { print "
"; print "No Item Selected<\/b>
"; print "\"Back\"<\/a>"; print "<\/div>"; } else { open(FOOD_ITEM, "foodItemDescription.dat"); @foodArray = ; close(FOOD_ITEM); for ($j=0; $j<=$#foodArray; $j++) { if ($foodArray[$j] =~ /$selectedFoodItem{'selected'}/) { ($foodName,$foodType,$foodDescription) = split(/\|/, $foodArray[$j]); $selectedFood = $foodName; $selectedFoodType = $foodType; $selectedFoodDescription = $foodDescription; } } print "
"; print "Selected Food Item for Modification: <\/i>" . $selectedFoodItem{'selected'} . "
"; print "
"; print "
"; print "
"; print "