File: while.htm

package info (click to toggle)
libembperl-perl 2.5.0-17
  • links: PTS, VCS
  • area: main
  • in suites: bookworm, sid
  • size: 7,632 kB
  • sloc: ansic: 21,387; perl: 14,497; javascript: 4,280; cpp: 467; xml: 49; makefile: 35; sh: 24
file content (26 lines) | stat: -rw-r--r-- 550 bytes parent folder | download | duplicates (7)
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

<html>
<head>
<title>While Metacommand in Embperl</title>
</head>
<body background="../images/jazzbkgd.gif">

This is a example of using the while metacommand in embperl to show the environment<P>

[- $i = 0; @k = keys %ENV -]
[$ while ($i &lt; $#k) $]
[+ $k[$i] +] = [+ $ENV{$k[$i]} +]<BR>
[- $i++ -]
[$ endwhile $]

<P>
This is a example of using the while metacommand in embperl to show the loaded modules<P>

[- $i = 0; @k = keys %INC -]
[$ while ($i &lt; $#k) $]
[+ $k[$i] +] = [+ $INC{$k[$i]} +]<BR>
[- $i++ -]
[$ endwhile $]

</body>
</html>