Debian Codegraph @

test/html/mix.htm

raw
1
2 <html>
3 <head>
4 <title>Embperl Tests - Mix top level perl, with subroutines and metacommands</title>
5 </head>
6
7 <body>
8
9 Here it starts with some HTML Text<P>
10
11 All values should be undefined:
12
13 [* $a = 'global value' ; *] <BR>
14
15 global value: $a = [+ $a || '' +] <BR>
16
17 [* { local $a ; *]
18
19 $a = [+ $a || '' +] <BR>
20
21 [* $a = 'lokal value' ; *] <BR>
22
23 lokal value: $a = [+ $a || '' +] <BR>
24
25 [* } *]
26
27 again global value: $a = [+ $a || '' +] <BR>
28
29 [* @x = (1, 4 ,8, 17) ; *]
30
31 [- $i = 0 -]
32 [$ while $i &lt;= $#x $]
33 [+ $i +] = [+ $x[$i] +] <br>
34 [* $j = 0 ; *]
35 [$ while $j &lt;= $i $]
36 [+ $j++ +]
37 [$ endwhile $]
38 <BR>
39 [* $i++ ; *]
40 [$ endwhile $]
41
42
43 [-
44 undef @b ;
45
46 $b[0][0] = 'b1/1' ;
47 $b[1][0] = 'b2/1' ;
48 $b[1][1] = 'b2/2' ;
49 $b[2][0] = 'b3/1' ;
50 $b[2][1] = 'b3/2' ;
51 $b[2][2] = 'b3/3' ;
52
53 -]
54
55 <table>
56 <tr>
57 <td>[* $i = $row ; *][+ $i +]</td><td>[+ $b[$row][$col] +] </td>
58 </tr>
59 </table>
60
61
62
63 </body>
64 </html>