File: nesting2.htm

package info (click to toggle)
libembperl-perl 2.5.0-10%2Bdeb9u1
  • links: PTS, VCS
  • area: main
  • in suites: stretch
  • size: 7,128 kB
  • sloc: ansic: 21,384; perl: 14,496; javascript: 4,280; cpp: 467; xml: 49; makefile: 33; sh: 24
file content (58 lines) | stat: -rw-r--r-- 860 bytes parent folder | download | duplicates (11)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
<html>
<head>
<title>Tests for Embperl - Nesting of html and meta commands 2</title>
</head>


<body>

[-
$fdat{aa} = 11 ;
$fdat{bb} = 22 ;
$fdat{cc} = 33 ;
$fdat{dd} = 44 ;

$t = 1 ;
$f = 0 ;

%a2 = ( 'a' => 1, 'b' => 2 ) ;
@a2 = sort keys %a2 ;

-]
[- @ks = sort keys %fdat -]

<table>
	<tr>
		<td>[+ $ks[$row] +]</td><td>[+ $fdat{$ks[$row] || ''} +]</td>
	</tr>
</table>

=== dl.1

<dl><dt>[+ $ks[$row] +]</dt><dd><ul><li>[+ $a2[$row] +]</li></ul></dd></dl>

=== dl.2

<dl><dt>[+ $ks[$row] +]</dt><dd><ul>[+ $a2[$row] +]</ul></dd></dl>

=== foreach.1

[- $i = 1 -]
[$foreach $a (@ks) $]
   [$foreach $b (@a2) $]
      [+ $i +]:[+ $a +] -> [+ $b +]
   [$endforeach$]
   [- $i++ -]
[$endforeach$]

.
=== foreach.2

[- $i = 1 -]
[$foreach $a (@ks) $]
   [$foreach $b (@a2) $]
      [+ $i +]:[+ $a +] -> [+ $b +]
   [- $i++ -]
   [$endforeach$]
[$endforeach$]