* 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
1 |
2 |
3 |
[+ $a[$row][$col] +] |
[+ $b[2][$col] +] |
[+ $a[$row][$col] +] |
[+ $HTML::Embperl::VERSION +]
[+ $tabmode +]
[+ local $tabmode = 1 +]
[- $i = 0 ; while ($i < 10) { $ii[$i++] = "ii[$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') ; -]
[$ while ($v, $k) = each (%h) $]
[+ "$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(keys %hash) $]
3:[+ $v +]
[$ endforeach $]
[- $i = 0 -]
[$ do $]
[+ "\@a[$i] = $a[$i]" +]
[$ while ($v, $k) = each (%h) $]
[+ "$v = $k" +]
[$ foreach $fv (1, 3, 5, 7, 9) $]
[+ $fv +]
[$ endforeach $]
[$ foreach $fv () $]
[+ $fv +]
[$ while ($wv, $wk) = each (%h) $]
[+ "$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 $]