| 1 |
|
| 2 |
<html> |
| 3 |
<head> |
| 4 |
<title>Some Plain tests for Embperl</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 = [+ $a +] <BR> |
| 14 |
$b = [+ $b +] <BR> |
| 15 |
$c = [+ $c +] <BR> |
| 16 |
$d = [+ $d +] <BR> |
| 17 |
$e = [+ $e +] <BR> |
| 18 |
|
| 19 |
Here we will see an error: |
| 20 |
|
| 21 |
[- $a = (qqqqqqqqqqqqqq -] |
| 22 |
|
| 23 |
First of all assign a value: |
| 24 |
[- $a = '(this is the value in $a)' -] <BR> |
| 25 |
|
| 26 |
Now we have some 'Umlaute': |
| 27 |
|
| 28 |
|
| 29 |
[- $b = "$a äöü" -] |
| 30 |
|
| 31 |
Second Error:<BR> |
| 32 |
[+ $a+ +] [+ qq2$b +]<BR> |
| 33 |
|
| 34 |
And now a and b together: [+ "$a$b" +]<P> |
| 35 |
|
| 36 |
Here we have some HTML tags within the perl code, Embperl will delete them!<BR> |
| 37 |
|
| 38 |
[+ $c = <BR> 6 + 17 <font size="3"> * 3 +] |
| 39 |
|
| 40 |
Embperl will also translate HMTL escapes to the right characters i.e. $a &lt; 6 will get the perl expression $a < 6: <BR> |
| 41 |
|
| 42 |
[- $e = 2 -] |
| 43 |
[+ $d = $e < 6 +] |
| 44 |
|
| 45 |
Now they should have a value |
| 46 |
[$if {$error is here ) $] |
| 47 |
$a = [+ $a +] <BR> |
| 48 |
$b = [+ $b +] <BR> |
| 49 |
$c = [+ $c +] <BR> |
| 50 |
$d = [+ $d +] <BR> |
| 51 |
$e = [+ $e +] <BR> |
| 52 |
[$endif$] |
| 53 |
|
| 54 |
|
| 55 |
Tag missmatch: |
| 56 |
|
| 57 |
<table> |
| 58 |
</tr> |
| 59 |
|
| 60 |
<P>Ok.<P> |
| 61 |
|
| 62 |
|
| 63 |
</body> |
| 64 |
</html> |