| 1 |
<!-- |
| 2 |
|
| 3 |
Copyright (C) 1997, 1998 Ken MacLeod |
| 4 |
See the file COPYING for distribution terms. |
| 5 |
|
| 6 |
$Id: my-html.html,v 1.1 1998/04/05 17:11:09 ken Exp $ |
| 7 |
|
| 8 |
This file can be used with the `my-html.pl' example. |
| 9 |
|
| 10 |
--> |
| 11 |
<HTML> |
| 12 |
<HEAD> |
| 13 |
<TITLE>This is the title of my page</TITLE> |
| 14 |
</HEAD> |
| 15 |
<BODY> |
| 16 |
<H1>This is the body of my page.</H1> |
| 17 |
|
| 18 |
<P>This page was rendered on <DATE/></P> |
| 19 |
|
| 20 |
<P>Perl code can be used to generate any output you want. Here's |
| 21 |
a list of primes between 1 and 100.</P> |
| 22 |
|
| 23 |
<P> |
| 24 |
<!-- this is a ``CDATA marked section'', the only special |
| 25 |
characters in a CDATA marked section are the the closing |
| 26 |
characters `]]>'. And no, they can't be escaped :-( --> |
| 27 |
<PERL><![CDATA[ |
| 28 |
@primes = (1); |
| 29 |
OUTER: |
| 30 |
for ($ii = 2; $ii <= 100; $ii ++) { |
| 31 |
for ($jj = 2; $jj < ($ii+1)/2; $jj ++) { |
| 32 |
next OUTER if (($ii % $jj) == 0); |
| 33 |
} |
| 34 |
push (@primes, $ii); |
| 35 |
} |
| 36 |
|
| 37 |
print join (", ", @primes); |
| 38 |
]]></PERL></P> |
| 39 |
</BODY> |
| 40 |
</HTML> |