<$$ep->print("<html>
<head>
<title>The test of HTML::EmbeddedPerl(BETA)</title>
</head>
<body>

<h2>The test of HTML::EmbeddedPerl(BETA)</h2>

<p>
<span style=\"color:#090;\">(source-code is visible green)</span>
</p>

"); use vars qw($qqq @xxx %zzz $flg); $qqq = "OK.";$ep->print("

<hr />

<p>");










foreach(sort keys %ENV){
  print STDOUT "$_: $ENV{$_}<br />\n";
}
$ep->print("</p>

<hr />

<p>"); $ep->print(<<__EOP__);
/* comments 36 */<br />
// comments 37<br />
# comments 38<br />
__EOP__
$ep->print("</p>

<hr />

<p>"); $ep->print("# $qqq");$ep->print("</p>

<p>\$qqq = <span style=\"color:#f90;\">$qqq</span></p>

<hr />

"); @xxx = ("a".."c");$ep->print("

");{ my($c,$n) = (scalar(@xxx),'xxx'); for(my $i=0;$i<@xxx;$i++){ $_ = $xxx[$i]; $ep->print("<p>$_</p>\n"); }};$ep->print("

<p>\@xxx = <span style=\"color:#f90;\">@xxx</span></p>

<hr />

"); %zzz = ("a"=>[1,2,3],"b"=>[4,5,6]);$ep->print("

<table border=\"0\" cellspacing=\"2\" cellpadding=\"1\">
");{ my($c,$n) = (scalar(keys %zzz),'zzz'); foreach my $k(keys %zzz){ my $v = $zzz{$k}; $ep->print("<tr><th>$k</th>"); { my($c,$n) = (scalar(@{$v}),'{$v}'); for(my $i=0;$i<@{$v};$i++){ $_ = ${$v}[$i]; $ep->print("<td>$_</td>"); }}; $ep->print("</tr>\n"); }};$ep->print("
</table>

<p>\@\{\$zzz{a}\} = <span style=\"color:#f90;\">@{$zzz{a}}</span></p>
<p>\@\{\$zzz{b}\} = <span style=\"color:#f90;\">@{$zzz{b}}</span></p>

<hr />

"); $flg = 1; print "# not comment<br />\n";$ep->print("
");{ if($flg){ $ep->print("<p>1</p>"); } elsif(!$flg) { $ep->print("<p>0</p>"); } else { $ep->print("<p>?</p>") }};$ep->print("

<hr />

<p>"); $ep->print(ref($ep));$ep->print("</p>

<hr />

<p>"); $ep->print(ref($ev));$ep->print("</p>

<hr />

<p>define subroutine.</p>
");
sub test_print{ $ep->print('OK.'); };
$ep->print("

<hr />

<p>"); &test_print;$ep->print("</p>

<hr />

<p>"); $ep->print('test');$ep->print("</p>

"); $ep->header_out('Content-Create','foo');$ep->print("

<hr />

<div>$ENV{SERVER_SOFTWARE}</div>

</body>
</html>
");$>
