I hit send too quickly.
At the end of your function, "return $output;".
[EMAIL PROTECTED] on 01/25/2002 01:54:31 PM
To: [EMAIL PROTECTED]
cc:
bcc:
Subject: Re: [cgiapp] Need a help...
Replace your "print" statements with '$output .= <<"_END_";'. For example,
print <<"_END_";
<TR>
_END_
;
would be replaced by
$output .= <<"_END_";
<TR>
_END_
;
See page 43 in the second edition of the "Camel book" (chapter 2, The Gory
Details, Here documents) for more information. Even though the book does
not say it, you can use a here document almost anywhere.
Good luck, and if you have not picked up the Camel book yet, I would
(again) recommend it.
Brian
[EMAIL PROTECTED] on 01/25/2002 01:24:49 PM
To: [EMAIL PROTECTED]
cc:
bcc:
Subject: [cgiapp] Need a help...
Guru's
Can someone pls give a hand to rewrite the following pice of the code with
the help of CGI::Application. I am trying to print a table on the webpage.
Thanks
Bal.
if ( $h == 1) {
foreach my $kv (@cols) {
print<<"_END_";
<TD>
<P align=center><STRONG>$kv </STRONG></P></TD>
_END_
;
$h++;
}
print<<"_END_";
</TR>
_END_
;
foreach my $row (@$data) {
my @cols = keys(%$row);
foreach (@cols) {
print<<"_END_";
<TD>
<P align=left>$row->{$_} </P></TD>
_END_
;
}
print<<"_END_";
</TR>
_END_
;
}
print<<"_END_";
</TR>
_END_
;
}
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]