Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations derfloh on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Strange behaviour of a 'here' document

Status
Not open for further replies.

webpager

Programmer
Joined
Mar 27, 2001
Messages
166
Location
GB
Hi Guys
I'm having a problem with the following sub routine and was wondering if you could spot the problem.
The sub routine doesn't complete but ends at athe point marked below.


sub OPTION_BOX{

if($ALL_FILES eq 4){
print "sub - OPTION BOX<BR>";
}

print <<"FIRST";

<table border="0" width="100%">
<tr>
<td width="100%" height="48">
FIRST

if($PROFYL ne 1){
if($error_head eq "open"){
print <<"MESSAGE";

<p align="center"><font color="#800000" face="Verdana" size="2"><b>$COMM1 $COMM2</b></font></p>
MESSAGE
}else{
print <<"MESSAGE";

<p align="center"><font color="#800000" face="Verdana" size="2"><b>$ECOMM</b></font></p>
MESSAGE

}
}


if($NO_GOOD eq "bad"){
print <<"MID HTML";
<p align="center"><font face="Verdana" size="2" color="#FF0000"><span style="background-color: #FFFF00">Please
Complete This Question</span></font></p>
MID HTML
}

#kkk

print "here by 1 q- $QUESTION b- $BOXNAME<br>";
print <<"QUESTION HTML";
<p align="center"><font face="Verdana" size="2">
<b>$QUESTION</b><br>
<p>

# The routine executes up to here then returns control to the calling routine.

# If I remove the following line, the whole routine is completed. Leave it in and it RETURNS here.
# ------------------------
<select size="1" name="D1">
# ------------------------


QUESTION HTML
print "here by 2<br>";
for($x=1; $x<$OP+1 ;++$x){
print "make selected $x - $MAKE_SELECTED[$x]";
if($MAKE_SELECTED[$x] eq 1){
$OPT_SELECT="wild";
}
if($OPT_SELECT eq "wild"){
print <<"OPTION CODE";
<option>$OPT[$x]</option>
OPTION CODE
}else{
print <<"OPTION CODE";
<option Selected>$OPT[$x]</option>
OPTION CODE

}
}

print <<"END CODE";

</select></font></p>
</td>
</tr>
<tr>
<td width="100%" height="48" colspan="3">

<p align="center"><font face="Verdana" color="#008080" size="3">____________________________________</font></p>
<p align="center">&nbsp;
</td>
</tr>
</table>
END CODE
}

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top