I am about to shoot myself. When I use the -w perl interpreter, it keeps coming back that "
"mapblast" and "com" are unqouted strings, and may be clashing with future reserved words, but I sure as hell can't seem to find them. Also, it keeps saying that "myblast" and "com" isn't "numeric in divide". Finally, it keeps saying I'm trying to divide by zero.
I've copied the troubled line below, again, and below it, I pasted all the source code, for anyone who might be interested. Again, I really appreciate any help, and am obviously too much of a newbie, sometimes.
Here is the code line that the interpreter is having problems with:
print qq~
<BODY onLoad="window.location.href='
9th Avenue North&AD3_1=Naples, FL&AD4_1=US&AD2_street_2=$address&AD3_2=$city, $state&AD4_2=US&req_action=getdir'">
~;
}
And here's the full source code.
#!/usr/local/bin/perl
# $vendor_name, $vendor_type, $vendor_number, $url, $email, $banner, $address, $city, $state, $phone, $discount, $rollover, $perma_ad, $perma_tip
# define some global variables
$fields = 273; # Number of fields in each record
$filename = "vendor.dat"; # The database text file
$results = 1000; # maximum number of results to display
&parse_form;
$searchstring = $FORM{'searchstring'};
&open_file("FILE1","",$filename);
print "Content-type: text/html\n\n";
print qq~;
<HTML>
<HEAD> <base target=main>
<TITLE>Search Results</TITLE>
</HEAD>
<HR width=80% noshade><BR><UL>
~;
$counter = 0;
while (($line = &read_file("FILE1"

) && ($counter < $results)) {
# split the fields at the | character
@tabledata = split(/\s*\|\s*/,$line ,$fields);
&check_record;
if ($found == 1) {
$counter++;
&print_record;
}
}
close(FILE1);
if ($counter == 0) {
print "<BR><B> Sorry, No Matches were found.</B>\n";
}
</BODY>
</HTML>
#########################################
#
# Print the matched record
#
#########################################
sub print_record {
print qq~
<BODY onLoad="window.location.href='
9th Avenue North&AD3_1=Naples, FL&AD4_1=US&AD2_street_2=$address&AD3_2=$city, $state&AD4_2=US&req_action=getdir'">
~;
}
##########################################
#
# Check to see if record matches search criteria
#
##########################################
sub check_record {
# get the data from the record read from the file. $tabledata
$linktitle = $tabledata[0];
$linkdescrip = $tabledata[1];
$linkwords = $tabledata[2];
$linemail = $tabledata[3];
$linkurl = $tabledata[4];
$faa = $tabledata[5];
$gaa = $tabledata[6];
$haa = $tabledata[7];
$iaa = $tabledata[8];
$jaa = $tabledata[9];
$kaa = $tabledata[10];
$laa = $tabledata[11];
$maa = $tabledata[12];
$naa = $tabledata[13];
$oaa = $tabledata[14];
$paa = $tabledata[15];
$extra_ad_item_huh = $tabledata[16];
$advertising_type = $tabledata[17];
$font_face = $tabledata[18];
$font_color = $tabledata[19];
$bgcolor = $tabledata[20];
$bgimage = $tabledata[21];
$hours = $tabledata[22];
$item_type_1 = $tabledata[23];
$item_title_1 = $tabledata[24];
$item_price_1 = $tabledata[25];
$item_description_1 = $tabledata[26];
$item_other_1 = $tabledata[27];
$item_type_2 = $tabledata[28];
$item_title_2 = $tabledata[29];
$item_price_2 = $tabledata[30];
$item_description_2 = $tabledata[31];
$item_other_2 = $tabledata[32];
$item_type_3 = $tabledata[33];
$item_title_3 = $tabledata[34];
$item_price_3 = $tabledata[35];
$item_description_3 = $tabledata[36];
$item_other_3 = $tabledata[37];
$item_type_4 = $tabledata[38];
$item_title_4 = $tabledata[39];
$item_price_4 = $tabledata[40];
$item_description_4 = $tabledata[41];
$item_other_4 = $tabledata[42];
$item_type_5 = $tabledata[43];
$item_title_5 = $tabledata[44];
$item_price_5 = $tabledata[45];
$item_description_5 = $tabledata[46];
$item_other_5 = $tabledata[47];
$item_type_6 = $tabledata[48];
$item_title_6 = $tabledata[49];
$item_price_6 = $tabledata[50];
$item_description_6 = $tabledata[51];
$item_other_6 = $tabledata[52];
$item_type_7 = $tabledata[53];
$item_title_7 = $tabledata[54];
$item_price_7 = $tabledata[55];
$item_description_7 = $tabledata[56];
$item_other_7 = $tabledata[57];
$item_type_8 = $tabledata[58];
$item_title_8 = $tabledata[59];
$item_price_8 = $tabledata[60];
$item_description_8 = $tabledata[61];
$item_other_8 = $tabledata[62];
$item_type_9 = $tabledata[63];
$item_title_9 = $tabledata[64];
$item_price_9 = $tabledata[65];
$item_description_9 = $tabledata[66];
$item_other_9 = $tabledata[67];
$item_type_10 = $tabledata[68];
$item_title_10 = $tabledata[69];
$item_price_10 = $tabledata[70];
$item_description_10 = $tabledata[71];
$item_other_10 = $tabledata[72];
$item_type_11 = $tabledata[73];
$item_title_11 = $tabledata[74];
$item_price_11 = $tabledata[75];
$item_description_11 = $tabledata[76];
$item_other_11 = $tabledata[77];
$item_type_12 = $tabledata[78];
$item_title_12 = $tabledata[79];
$item_price_12 = $tabledata[80];
$item_description_12 = $tabledata[81];
$item_other_12 = $tabledata[82];
$item_type_13 = $tabledata[83];
$item_title_13 = $tabledata[84];
$item_price_13 = $tabledata[85];
$item_description_13 = $tabledata[86];
$item_other_13 = $tabledata[87];
$item_type_14 = $tabledata[88];
$item_title_14 = $tabledata[89];
$item_price_14 = $tabledata[90];
$item_description_14 = $tabledata[91];
$item_other_14 = $tabledata[92];
$item_type_15 = $tabledata[93];
$item_title_15 = $tabledata[94];
$item_price_15 = $tabledata[95];
$item_description_15 = $tabledata[96];
$item_other_15 = $tabledata[97];
$item_type_16 = $tabledata[98];
$item_title_16 = $tabledata[99];
$item_price_16 = $tabledata[100];
$item_description_16 = $tabledata[101];
$item_other_16 = $tabledata[102];
$item_type_17 = $tabledata[103];
$item_title_17 = $tabledata[104];
$item_price_17 = $tabledata[105];
$item_description_17 = $tabledata[106];
$item_other_17 = $tabledata[107];
$item_type_18 = $tabledata[108];
$item_title_18 = $tabledata[109];
$item_price_18 = $tabledata[110];
$item_description_18 = $tabledata[111];
$item_other_18 = $tabledata[112];
$item_type_19 = $tabledata[113];
$item_title_19 = $tabledata[114];
$item_price_19 = $tabledata[115];
$item_description_19 = $tabledata[116];
$item_other_19 = $tabledata[117];
$item_type_20 = $tabledata[118];
$item_title_20 = $tabledata[119];
$item_price_20 = $tabledata[120];
$item_description_20 = $tabledata[121];
$item_other_20 = $tabledata[122];
$item_type_21 = $tabledata[123];
$item_title_21 = $tabledata[124];
$item_price_21 = $tabledata[125];
$item_description_21 = $tabledata[126];
$item_other_21 = $tabledata[127];
$item_type_22 = $tabledata[128];
$item_title_22 = $tabledata[129];
$item_price_22 = $tabledata[130];
$item_description_22 = $tabledata[131];
$item_other_22 = $tabledata[132];
$item_type_23 = $tabledata[133];
$item_title_23 = $tabledata[134];
$item_price_23 = $tabledata[135];
$item_description_23 = $tabledata[136];
$item_other_23 = $tabledata[137];
$item_type_24 = $tabledata[138];
$item_title_24 = $tabledata[139];
$item_price_24 = $tabledata[140];
$item_description_24 = $tabledata[141];
$item_other_24 = $tabledata[142];
$item_type_25 = $tabledata[143];
$item_title_25 = $tabledata[144];
$item_price_25 = $tabledata[145];
$item_description_25 = $tabledata[146];
$item_other_25 = $tabledata[147];
$item_type_26 = $tabledata[148];
$item_title_26 = $tabledata[149];
$item_price_26 = $tabledata[150];
$item_description_26 = $tabledata[151];
$item_other_26 = $tabledata[152];
$item_type_27 = $tabledata[153];
$item_title_27 = $tabledata[154];
$item_price_27 = $tabledata[155];
$item_description_27 = $tabledata[156];
$item_other_27 = $tabledata[157];
$item_type_28 = $tabledata[158];
$item_title_28 = $tabledata[159];
$item_price_28 = $tabledata[160];
$item_description_28 = $tabledata[161];
$item_other_28 = $tabledata[162];
$item_type_29 = $tabledata[163];
$item_title_29 = $tabledata[164];
$item_price_29 = $tabledata[165];
$item_description_29 = $tabledata[166];
$item_other_29 = $tabledata[167];
$item_type_30 = $tabledata[168];
$item_title_30 = $tabledata[169];
$item_price_30 = $tabledata[170];
$item_description_30 = $tabledata[171];
$item_other_30 = $tabledata[172];
$item_type_31 = $tabledata[173];
$item_title_31 = $tabledata[174];
$item_price_31 = $tabledata[175];
$item_description_31 = $tabledata[176];
$item_other_31 = $tabledata[177];
$item_type_32 = $tabledata[178];
$item_title_32 = $tabledata[179];
$item_price_32 = $tabledata[180];
$item_description_32 = $tabledata[181];
$item_other_32 = $tabledata[182];
$item_type_33 = $tabledata[183];
$item_title_33 = $tabledata[184];
$item_price_33 = $tabledata[185];
$item_description_33 = $tabledata[186];
$item_other_33 = $tabledata[187];
$item_type_34 = $tabledata[188];
$item_title_34 = $tabledata[189];
$item_price_34 = $tabledata[190];
$item_description_34 = $tabledata[191];
$item_other_34 = $tabledata[192];
$item_type_35 = $tabledata[193];
$item_title_35 = $tabledata[194];
$item_price_35 = $tabledata[195];
$item_description_35 = $tabledata[196];
$item_other_35 = $tabledata[197];
$item_type_36 = $tabledata[198];
$item_title_36 = $tabledata[199];
$item_price_36 = $tabledata[200];
$item_description_36 = $tabledata[201];
$item_other_36 = $tabledata[202];
$item_type_37 = $tabledata[203];
$item_title_37 = $tabledata[204];
$item_price_37 = $tabledata[205];
$item_description_37 = $tabledata[206];
$item_other_37 = $tabledata[207];
$item_type_38 = $tabledata[208];
$item_title_38 = $tabledata[209];
$item_price_38 = $tabledata[210];
$item_description_38 = $tabledata[211];
$item_other_38 = $tabledata[212];
$item_type_39 = $tabledata[213];
$item_title_39 = $tabledata[214];
$item_price_39 = $tabledata[215];
$item_description_39 = $tabledata[216];
$item_other_39 = $tabledata[217];
$item_type_40 = $tabledata[218];
$item_title_40 = $tabledata[219];
$item_price_40 = $tabledata[220];
$item_description_40 = $tabledata[221];
$item_other_40 = $tabledata[222];
$item_type_41 = $tabledata[223];
$item_title_41 = $tabledata[224];
$item_price_41 = $tabledata[225];
$item_description_41 = $tabledata[226];
$item_other_41 = $tabledata[227];
$item_type_42 = $tabledata[228];
$item_title_42 = $tabledata[229];
$item_price_42 = $tabledata[230];
$item_description_42 = $tabledata[231];
$item_other_42 = $tabledata[232];
$item_type_43 = $tabledata[233];
$item_title_43 = $tabledata[234];
$item_price_43 = $tabledata[235];
$item_description_43 = $tabledata[236];
$item_other_43 = $tabledata[237];
$item_type_44 = $tabledata[238];
$item_title_44 = $tabledata[239];
$item_price_44 = $tabledata[240];
$item_description_44 = $tabledata[241];
$item_other_44 = $tabledata[242];
$item_type_45 = $tabledata[243];
$item_title_45 = $tabledata[244];
$item_price_45 = $tabledata[245];
$item_description_45 = $tabledata[246];
$item_other_45 = $tabledata[247];
$item_type_46 = $tabledata[248];
$item_title_46 = $tabledata[249];
$item_price_46 = $tabledata[250];
$item_description_46 = $tabledata[251];
$item_other_46 = $tabledata[252];
$item_type_47 = $tabledata[253];
$item_title_47 = $tabledata[254];
$item_price_47 = $tabledata[255];
$item_description_47 = $tabledata[256];
$item_other_47 = $tabledata[257];
$item_type_48 = $tabledata[258];
$item_title_48 = $tabledata[259];
$item_price_48 = $tabledata[260];
$item_description_48 = $tabledata[261];
$item_other_48 = $tabledata[262];
$item_type_49 = $tabledata[263];
$item_title_49 = $tabledata[264];
$item_price_49 = $tabledata[265];
$item_description_49 = $tabledata[266];
$item_other_49 = $tabledata[267];
$item_type_50 = $tabledata[268];
$item_title_50 = $tabledata[269];
$item_price_50 = $tabledata[270];
$item_description_50 = $tabledata[271];
$item_other_50 = $tabledata[272];
$vendor_number = $linktitle;
$vendor_type = $linkdescrip;
$vendor_type_specific = $linkwords;
$vendor_type_number = $linemail;
$vendor_name = $linkurl;
$banner = $faa;
$address = $gaa;
$city = $haa;
$state = $iaa;
$phone = $jaa;
$email = $kaa;
$url = $laa;
$discount_huh = $maa;
$discount = $naa;
$perma_tip = $oaa;
$perma_ad = $paa;
$extra_ad_item_huh_1 = $extra_ad_item_huh;
$advertising_type_1 = $advertising_type;
$font_face_1 = $font_face;
$font_color_1 = $font_color;
$bgcolor_1 = $bgcolor;
$bgimage_1 = $bgimage;
$hours_1 = $hours;
$item_type_1_1 = $item_type_1;
$item_title_1_1 = $item_title_1;
$item_price_1_1 = $item_price_1;
$item_description_1_1 = $item_description_1;
$item_other_1_1 = $item_other_1;
$item_type_2_2 = $item_type_2;
$item_title_2_2 = $item_title_2;
$item_price_2_2 = $item_price_2;
$item_description_2_2 = $item_description_2;
$item_other_2_2 = $item_other_2;
$item_type_3_3 = $item_type_3;
$item_title_3_3 = $item_title_3;
$item_price_3_3 = $item_price_3;
$item_description_3_3 = $item_description_3;
$item_other_3_3 = $item_other_3;
$item_type_4_4 = $item_type_4;
$item_title_4_4 = $item_title_4;
$item_price_4_4 = $item_price_4;
$item_description_4_4 = $item_description_4;
$item_other_4_4 = $item_other_4;
$item_type_5_5 = $item_type_5;
$item_title_5_5 = $item_title_5;
$item_price_5_5 = $item_price_5;
$item_description_5_5 = $item_description_5;
$item_other_5_5 = $item_other_5;
$item_type_6_6 = $item_type_6;
$item_title_6_6 = $item_title_6;
$item_price_6_6 = $item_price_6;
$item_description_6_6 = $item_description_6;
$item_other_6_6 = $item_other_6;
$item_type_7_7 = $item_type_7;
$item_title_7_7 = $item_title_7;
$item_price_7_7 = $item_price_7;
$item_description_7_7 = $item_description_7;
$item_other_7_7 = $item_other_7;
$item_type_8_8 = $item_type_8;
$item_title_8_8 = $item_title_8;
$item_price_8_8 = $item_price_8;
$item_description_8_8 = $item_description_8;
$item_other_8_8 = $item_other_8;
$item_type_9_9 = $item_type_9;
$item_title_9_9 = $item_title_9;
$item_price_9_9 = $item_price_9;
$item_description_9_9 = $item_description_9;
$item_other_9_9 = $item_other_9;
$item_type_10_10 = $item_type_10;
$item_title_10_10 = $item_title_10;
$item_price_10_10 = $item_price_10;
$item_description_10_10 = $item_description_10;
$item_other_10_10 = $item_other_10;
$item_type_11_11 = $item_type_11;
$item_title_11_11 = $item_title_11;
$item_price_11_11 = $item_price_11;
$item_description_11_11 = $item_description_11;
$item_other_11_11 = $item_other_11;
$item_type_12_12 = $item_type_12;
$item_title_12_12 = $item_title_12;
$item_price_12_12 = $item_price_12;
$item_description_12_12 = $item_description_12;
$item_other_12_12 = $item_other_12;
$item_type_13_13 = $item_type_13;
$item_title_13_13 = $item_title_13;
$item_price_13_13 = $item_price_13;
$item_description_13_13 = $item_description_13;
$item_other_13_13 = $item_other_13;
$item_type_14_14 = $item_type_14;
$item_title_14_14 = $item_title_14;
$item_price_14_14 = $item_price_14;
$item_description_14_14 = $item_description_14;
$item_other_14_14 = $item_other_14;
$item_type_15_15 = $item_type_15;
$item_title_15_15 = $item_title_15;
$item_price_15_15 = $item_price_15;
$item_description_15_15 = $item_description_15;
$item_other_15_15 = $item_other_15;
$item_type_16_16 = $item_type_16;
$item_title_16_16 = $item_title_16;
$item_price_16_16 = $item_price_16;
$item_description_16_16 = $item_description_16;
$item_other_16_16 = $item_other_16;
$item_type_17_17 = $item_type_17;
$item_title_17_17 = $item_title_17;
$item_price_17_17 = $item_price_17;
$item_description_17_17 = $item_description_17;
$item_other_17_17 = $item_other_17;
$item_type_18_18 = $item_type_18;
$item_title_18_18 = $item_title_18;
$item_price_18_18 = $item_price_18;
$item_description_18_18 = $item_description_18;
$item_other_18_18 = $item_other_18;
$item_type_19_19 = $item_type_19;
$item_title_19_19 = $item_title_19;
$item_price_19_19 = $item_price_19;
$item_description_19_19 = $item_description_19;
$item_other_19_19 = $item_other_19;
$item_type_20_20 = $item_type_20;
$item_title_20_20 = $item_title_20;
$item_price_20_20 = $item_price_20;
$item_description_20_20 = $item_description_20;
$item_other_20_20 = $item_other_20;
$item_type_21_21 = $item_type_21;
$item_title_21_21 = $item_title_21;
$item_price_21_21 = $item_price_21;
$item_description_21_21 = $item_description_21;
$item_other_21_21 = $item_other_21;
$item_type_22_22 = $item_type_22;
$item_title_22_22 = $item_title_22;
$item_price_22_22 = $item_price_22;
$item_description_22_22 = $item_description_22;
$item_other_22_22 = $item_other_22;
$item_type_23_23 = $item_type_23;
$item_title_23_23 = $item_title_23;
$item_price_23_23 = $item_price_23;
$item_description_23_23 = $item_description_23;
$item_other_23_23 = $item_other_23;
$item_type_24_24 = $item_type_24;
$item_title_24_24 = $item_title_24;
$item_price_24_24 = $item_price_24;
$item_description_24_24 = $item_description_24;
$item_other_24_24 = $item_other_24;
$item_type_25_25 = $item_type_25;
$item_title_25_25 = $item_title_25;
$item_price_25_25 = $item_price_25;
$item_description_25_25 = $item_description_25;
$item_other_25_25 = $item_other_25;
$item_type_26_26 = $item_type_26;
$item_title_26_26 = $item_title_26;
$item_price_26_26 = $item_price_26;
$item_description_26_26 = $item_description_26;
$item_other_26_26 = $item_other_26;
$item_type_27_27 = $item_type_27;
$item_title_27_27 = $item_title_27;
$item_price_27_27 = $item_price_27;
$item_description_27_27 = $item_description_27;
$item_other_27_27 = $item_other_27;
$item_type_28_28 = $item_type_28;
$item_title_28_28 = $item_title_28;
$item_price_28_28 = $item_price_28;
$item_description_28_28 = $item_description_28;
$item_other_28_28 = $item_other_28;
$item_type_29_29 = $item_type_29;
$item_title_29_29 = $item_title_29;
$item_price_29_29 = $item_price_29;
$item_description_29_29 = $item_description_29;
$item_other_29_29 = $item_other_29;
$item_type_30_30 = $item_type_30;
$item_title_30_30 = $item_title_30;
$item_price_30_30 = $item_price_30;
$item_description_30_30 = $item_description_30;
$item_other_30_30 = $item_other_30;
$item_type_31_31 = $item_type_31;
$item_title_31_31 = $item_title_31;
$item_price_31_31 = $item_price_31;
$item_description_31_31 = $item_description_31;
$item_other_31_31 = $item_other_31;
$item_type_32_32 = $item_type_32;
$item_title_32_32 = $item_title_32;
$item_price_32_32 = $item_price_32;
$item_description_32_32 = $item_description_32;
$item_other_32_32 = $item_other_32;
$item_type_33_33 = $item_type_33;
$item_title_33_33 = $item_title_33;
$item_price_33_33 = $item_price_33;
$item_description_33_33 = $item_description_33;
$item_other_33_33 = $item_other_33;
$item_type_34_34 = $item_type_34;
$item_title_34_34 = $item_title_34;
$item_price_34_34 = $item_price_34;
$item_description_34_34 = $item_description_34;
$item_other_34_34 = $item_other_34;
$item_type_35_35 = $item_type_35;
$item_title_35_35 = $item_title_35;
$item_price_35_35 = $item_price_35;
$item_description_35_35 = $item_description_35;
$item_other_35_35 = $item_other_35;
$item_type_36_36 = $item_type_36;
$item_title_36_36 = $item_title_36;
$item_price_36_36 = $item_price_36;
$item_description_36_36 = $item_description_36;
$item_other_36_36 = $item_other_36;
$item_type_37_37 = $item_type_37;
$item_title_37_37 = $item_title_37;
$item_price_37_37 = $item_price_37;
$item_description_37_37 = $item_description_37;
$item_other_37_37 = $item_other_37;
$item_type_38_38 = $item_type_38;
$item_title_38_38 = $item_title_38;
$item_price_38_38 = $item_price_38;
$item_description_38_38 = $item_description_38;
$item_other_38_38 = $item_other_38;
$item_type_39_39 = $item_type_39;
$item_title_39_39 = $item_title_39;
$item_price_39_39 = $item_price_39;
$item_description_39_39 = $item_description_39;
$item_other_39_39 = $item_other_39;
$item_type_40_40 = $item_type_40;
$item_title_40_40 = $item_title_40;
$item_price_40_40 = $item_price_40;
$item_description_40_40 = $item_description_40;
$item_other_40_40 = $item_other_40;
$item_type_41_41 = $item_type_41;
$item_title_41_41 = $item_title_41;
$item_price_41_41 = $item_price_41;
$item_description_41_41 = $item_description_41;
$item_other_41_41 = $item_other_41;
$item_type_42_42 = $item_type_42;
$item_title_42_42 = $item_title_42;
$item_price_42_42 = $item_price_42;
$item_description_42_42 = $item_description_42;
$item_other_42_42 = $item_other_42;
$item_type_43_43 = $item_type_43;
$item_title_43_43 = $item_title_43;
$item_price_43_43 = $item_price_43;
$item_description_43_43 = $item_description_43;
$item_other_43_43 = $item_other_43;
$item_type_44_44 = $item_type_44;
$item_title_44_44 = $item_title_44;
$item_price_44_44 = $item_price_44;
$item_description_44_44 = $item_description_44;
$item_other_44_44 = $item_other_44;
$item_type_45_45 = $item_type_45;
$item_title_45_45 = $item_title_45;
$item_price_45_45 = $item_price_45;
$item_description_45_45 = $item_description_45;
$item_other_45_45 = $item_other_45;
$item_type_46_46 = $item_type_46;
$item_title_46_46 = $item_title_46;
$item_price_46_46 = $item_price_46;
$item_description_46_46 = $item_description_46;
$item_other_46_46 = $item_other_46;
$item_type_47_47 = $item_type_47;
$item_title_47_47 = $item_title_47;
$item_price_47_47 = $item_price_47;
$item_description_47_47 = $item_description_47;
$item_other_47_47 = $item_other_47;
$item_type_48_48 = $item_type_48;
$item_title_48_48 = $item_title_48;
$item_price_48_48 = $item_price_48;
$item_description_48_48 = $item_description_48;
$item_other_48_48 = $item_other_48;
$item_type_49_49 = $item_type_49;
$item_title_49_49 = $item_title_49;
$item_price_49_49 = $item_price_49;
$item_description_49_49 = $item_description_49;
$item_other_49_49 = $item_other_49;
$item_type_50_50 = $item_type_50;
$item_title_50_50 = $item_title_50;
$item_price_50_50 = $item_price_50;
$item_description_50_50 = $item_description_50;
$item_other_50_50 = $item_other_50;
#build the search line with all fields we want to search in
$searchline = $vendor_number;
#search by keywords
# only perform the keyword search if the length of the search string is greater than 2
# don't think we want people to search for and or or etc.
$sfound = 0;
$found = 0;
$notfound = 1;
$stlen = length($searchstring);
if ($stlen >= 1) {
@words = split(/ +/,$searchstring);
foreach $aword (@words) {
if ($searchline == $aword) {
$sfound = 1;
}
else {
$notfound = 0;
}
}
}
if ($sfound == 1 && $notfound == 1) {
$found = 1;
}
# if search string is too small .. set found to 1
if ($stlen <= 0) {
$found = 1;
}
#if page doesn't have a title then return not found
$tlen = length($linktitle);
if ($tlen < 1) {
$found = 0;
}
}
sub parse_form {
read(STDIN, $buffer, $ENV{'CONTENT_LENGTH'});
if (length($buffer) < 14) {
$buffer = $ENV{QUERY_STRING};
}
@pairs = split(/&/, $buffer);
foreach $pair (@pairs) {
($name, $value) = split(/=/, $pair);
$value =~ tr/+/ /;
$value =~ s/%([a-fA-F0-9][a-fA-F0-9])/pack("C", hex($1))/eg;
$FORM{$name} = $value;
}
}
sub open_file {
local ($filevar, $filemode, $filename) = @_;
open ($filevar,$filemode . $filename) ||
die ("Can't open $filename"

;
}
sub read_file {
local ($filevar) = @_;
<$filevar>;
}
sub write_file {
local ($filevar, $line) = @_;
print $filevar ($line);
}
Thanks for any help.
Ethan