[$ var $a $b $c $d $e $i $j $ii $v $k $fv @a %a @b %h @c @ii %hash $wv $wk @hh @hhh $]
Here it starts with some HTML Text
All values should be undefined:
$a = [+ $a || '' +]
$b = [+ $b || '' +]
$c = [+ $c || '' +]
$d = [+ $d || '' +]
$e = [+ $e || '' +]
First of all assign a value:
[- $a = '(this is the value in $a)' -]
Now we have some 'Umlaute':
[- $b = "$a äöü" -]
Now lets look what we are getting from this:
[+ $a +] [+ $b +]
And now a and b together: [+ "$a$b" +]
Here we have some HTML tags within the perl code, Embperl will delete them!
[+ $c =
6 + 17 * 3 +]
Embperl will also translate HMTL escapes to the right characters i.e. $a < 6 will get the perl expression $a < 6:
[- $e = 2 -]
[+ $d = $e < 6 +]
Now they should have a value
$a = [+ $a +]
$b = [+ $b +]
$c = [+ $c +]
$d = [+ $d +]
$e = [+ $e +]
[- $a = 1; $b = 0; $c = 5; $d = 'txt' -]
[$if $a$]
a
[$ endif$]
[$if $a $]
a
[$else$]
not a
[$ endif $]
[$ if $a$]
a
[$if $b == 0$]
b is null
[$else$]
b is not null
[$endif$]
[$ else$]
not a
[$ endif $]
[$ if $a$]
a
[$if $b == 0$]
b is null
[$else$]
b is not null
[$endif$]
[$ else$]
not a
[$if $b == 0$]
b is null
[$else$]
b is not null
[$endif$]
[$ endif $]
[$ if !$a$]
not a
[$if $b == 0$]
b is null
[$else$]
b is not null
[$endif$]
[$ else$]
a
[$if $b == 0$]
b is null
[$else$]
b is not null
[$endif$]
[$ endif $]
[- $i = 0 -]
[$ while $i <= $#ffld $]
[+ $ffld[$i] +] = [+ $fdat{$ffld[$i]} +]
[- $j = 0 -]
[$ while $j <= $i $]
[+ $j++ +]
[$ endwhile $]
[- $i++ -]
[$ endwhile $]
$tabmode = default
Display an two dimensional array with one, two and three columns !
Please take a look at the source in your browser to see the difference
[-
undef @a ;
undef @b ;
$a[0][0] = 'a1/1' ;
$a[1][0] = 'a2/1' ;
$a[1][1] = 'a2/2' ;
$a[2][0] = 'a3/1' ;
$a[2][1] = 'a3/2' ;
$a[2][2] = 'a3/3' ;
$b[0][0] = 'b1/1' ;
$b[1][0] = 'b2/1' ;
$b[1][1] = 'b2/2' ;
$b[2][0] = 'b3/1' ;
$b[2][1] = 'b3/2' ;
$b[2][2] = 'b3/3' ;
$maxcol=99 ;
-]
$a[0][[0] = '1/1' ;
$a[1][[0] = '2/1' ;
$a[1][[1] = '2/2' ;
$a[2][[0] = '3/1' ;
$a[2][[1] = '3/2' ;
$a[2][[2] = '3/3' ;
$tabmode = default
[+ $Embperl::VERSION +]
[+ $tabmode || 17 +]
[+ local $tabmode = 1 +]
[- $i = 0 ; while ($i < 10) { $ii[$i] = "ii[$i] = $i" ; $i++ ; } -]
[- $i = 0 -]
[$ while $i <= $#ffld $]
[+ $ffld[$i] +] = [+ $fdat{$ffld[$i]} +]
[- $j = 0 -]
[$ while $j <= $i $]
[+ $j++ +]
[$ endwhile $]
[- $i++ -]
[$ endwhile $]
[- $i = 0 -]
[$ while($i <= 2)$]
[+ $i++ +]
[$ endwhile $]
[- %h = ('A' => 1, 'B' => 2, 'C' => 3) ; -]
[- @a = ('a', 'b', 'c', 'd') ; -]
[- @hh = map { $_ => $h{$_} } sort keys %h -]
[$ while ($v = shift @hh, $k = shift @hh) $]
[+ "$v = $k" +]
[$ endwhile $]
[- $i = 0 -]
[$ while $i <= $#a $]
[+ "\@a[$i] = $a[$i]" +]
[- $i++ -]
[$ endwhile $]
[- $i = 0 -]
[$ do $]
[+ "\@a[$i] = $a[$i]" +]
[- $i++ -]
[$ until $i > $#a $]
[$ foreach $v (@a) $]
[+ $v +]
[$ endforeach $]
[$ foreach $v (1, 3, 5, 7, 9) $]
[+ $v +]
[$ endforeach $]
[$ foreach $v (1..10) $]
[+ $v +]
[$ endforeach $]
[$ foreach $v(1..5) $]
2:[+ $v +]
[$ endforeach $]
[- %hash = ( a=>1, b=>2, c=>3) -]
[$ foreach $v(sort keys %hash) $]
3:[+ $v +]
[$ endforeach $]
[- $i = 0 -]
[$ do $]
[+ "\@a[$i] = $a[$i]" +]
[- @hh = map { $_ => $h{$_} } sort keys %h -]
[$ while ($v = shift @hh, $k = shift @hh) $]
[+ "$v = $k" +]
[$ foreach $fv (1, 3, 5, 7, 9) $]
[+ $fv +]
[$ endforeach $]
[$ foreach $fv (()) $]
[+ $fv +]
[- @hh = map { $_ => $h{$_} } sort keys %h -]
[$ while ($wv = shift @hh, $wk = shift @hh) $]
[+ "$wv = $wk" +]
[$ endwhile $]
[$ endforeach $]
[$ endwhile $]
[- $i++ -]
[$ until $i > $#a $]
[- undef @a ; undef @b -]
[$ if 1 $]
x
[$ foreach $a (@a) $]
[$ foreach $b (@b) $]
[$ endforeach $]
[$ endforeach $]
y
[$ endif $]