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 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326
|
<html>
<head>
<title>Embperl Tests - Include other Embperl pages via Execute</title>
</head>
<h1>Embperl Tests - Include other Embperl pages via Execute</h1>
<H1> 1.) Include from memory</H1>
<P>Here is some text</P>
<H1> 2.) Include from memory with some Embperl code</H1>
<table><tr><td>a1</td> <td>b2</td> <td>c3</td> </tr> </table> </P>
<H1> 3.) Include from memory with passing of variables</H1>
<P>Transfer some vars Some Var !</P>
<H1> 4.) Change the variable, but not the code</H1>
<P>Transfer some vars Do it again !</P>
<H1> 5a.) Use method -> param to pass parameters</H1>
<P>Use method -> param to transfer some data (1 2 3 4) !</P>
<H1> 5.) Use \@param to pass parameters</H1>
<P>Use @param to transfer some data (1 2 3 4) !</P>
<H1> 6.) Use \@param to pass parameters and return it</H1>
<H3> $p[0] is vara and $p[1] is varb<H3>
<P>Got data in @param (vara varb) !</P><P>Change data in @param to (newA newB) !</P>
<H3> $p[0] is now newA and $p[1] is now newB <H3>
<H1> 7.) Presetup \%fdat and \@ffld</H1>
<P><table><tr><td>fdat</td><td>text</td></tr><tr><td>test</td><td>value</td></tr></table></P>
<H1> 7a.) Presetup my \%fdat and my \@ffld</H1>
<P><table><tr><td>fdat1</td><td>text1</td></tr><tr><td>test1</td><td>value1</td></tr></table></P>
<H1> 7b.) Presetup \%fdat</H1>
^<P><table><tr><td>(fdat2<\/td><td>text2<\/td><\/tr><tr><td>test2<\/td><td>value2|test2<\/td><td>value2<\/td><\/tr><tr><td>fdat2<\/td><td>text2)<\/td><\/tr><\/table><\/P>
<H1> 7c.) Presetup \@ffld</H1>
<P><table></table></P> @ffld = fdat3 test3
<H1> 8a.) Include a file</H1>
Here it starts with some HTML Text<P>
All values should be undefined at the first include and
apear at the second include:
<P>
$a = <BR>
$b = <BR>
$c = <BR>
$d = <BR>
$e = <BR>
First of all assign a value:
<BR>
Now we have some 'Umlaute':
Now lets look what we are getting from this:<BR>
(this is the value in $a) (this is the value in $a) äöü<BR>
And now a and b together: (this is the value in $a)(this is the value in $a) äöü<P>
Here we have some HTML tags within the perl code, Embperl will delete them!<BR>
57
SELECT * FROM a ORDER BY b USING <; Hi There>
Here we have something which looks like a HTML tag, but does not start with<br>
a character, Embperl does not change them!<BR>
SELECT * FROM a ORDER BY b USING <; Hi There>
Embperl will also translate HMTL escapes to the right characters i.e. $a &lt; 6 will get the perl expression $a < 6: <BR>
1
Now they should have a value
$a = (this is the value in $a) <BR>
$b = (this is the value in $a) äöü <BR>
$c = 57 <BR>
$d = 1 <BR>
$e = 2 <BR>
<P>Ok.<P>
<H1> 8b.) Include again the same file </H1>
Here it starts with some HTML Text<P>
All values should be undefined at the first include and
apear at the second include:
<P>
$a = (this is the value in $a) <BR>
$b = (this is the value in $a) äöü <BR>
$c = 57 <BR>
$d = 1 <BR>
$e = 2 <BR>
First of all assign a value:
<BR>
Now we have some 'Umlaute':
Now lets look what we are getting from this:<BR>
(this is the value in $a) (this is the value in $a) äöü<BR>
And now a and b together: (this is the value in $a)(this is the value in $a) äöü<P>
Here we have some HTML tags within the perl code, Embperl will delete them!<BR>
57
SELECT * FROM a ORDER BY b USING <; Hi There>
Here we have something which looks like a HTML tag, but does not start with<br>
a character, Embperl does not change them!<BR>
SELECT * FROM a ORDER BY b USING <; Hi There>
Embperl will also translate HMTL escapes to the right characters i.e. $a &lt; 6 will get the perl expression $a < 6: <BR>
1
Now they should have a value
$a = (this is the value in $a) <BR>
$b = (this is the value in $a) äöü <BR>
$c = 57 <BR>
$d = 1 <BR>
$e = 2 <BR>
<P>Ok.<P>
<H1> 9.) Include a file and return output in a scalar</H1>
<H3>
Here it starts with some HTML Text<P>
All values should be undefined at the first include and
apear at the second include:
<P>
$a = (this is the value in $a) <BR>
$b = (this is the value in $a) &auml;&ouml;&uuml; <BR>
$c = 57 <BR>
$d = 1 <BR>
$e = 2 <BR>
First of all assign a value:
<BR>
Now we have some 'Umlaute':
Now lets look what we are getting from this:<BR>
(this is the value in $a) (this is the value in $a) &auml;&ouml;&uuml;<BR>
And now a and b together: (this is the value in $a)(this is the value in $a) &auml;&ouml;&uuml;<P>
Here we have some HTML tags within the perl code, Embperl will delete them!<BR>
57
SELECT * FROM a ORDER BY b USING &lt;; Hi There&gt;
Here we have something which looks like a HTML tag, but does not start with<br>
a character, Embperl does not change them!<BR>
SELECT * FROM a ORDER BY b USING &lt;; Hi There&gt;
Embperl will also translate HMTL escapes to the right characters i.e. $a &amp;lt; 6 will get the perl expression $a &lt; 6: <BR>
1
Now they should have a value
$a = (this is the value in $a) <BR>
$b = (this is the value in $a) &auml;&ouml;&uuml; <BR>
$c = 57 <BR>
$d = 1 <BR>
$e = 2 <BR>
<P>Ok.<P>
</H3>
<H1> 10.) Include inside a table</H1>
<table>
<tr>
<td>
m1 : Start include
<table>
<tr>
<td>
m1 - s1 </td>
<td>
m1 - s2 </td>
<td>
m1 - s3 </td>
</tr>
</table>
Parameters:<BR>
<table>
<tr>
<td>
m1 </td>
<td>
main </td>
</tr>
</table>
p0 m1
p1 main
End include
</td>
</tr>
<tr>
<td>
m2 : Start include
<table>
<tr>
<td>
m2 - s1 </td>
<td>
m2 - s2 </td>
<td>
m2 - s3 </td>
</tr>
</table>
Parameters:<BR>
<table>
<tr>
<td>
m2 </td>
<td>
main </td>
</tr>
</table>
p0 m2
p1 main
End include
</td>
</tr>
<tr>
<td>
m3 : Start include
<table>
<tr>
<td>
m3 - s1 </td>
<td>
m3 - s2 </td>
<td>
m3 - s3 </td>
</tr>
</table>
Parameters:<BR>
<table>
<tr>
<td>
m3 </td>
<td>
main </td>
</tr>
</table>
p0 m3
p1 main
End include
</td>
</tr>
</table>
<H1> 11.) Include a file with parameters</H1>
Here is param[0] -> 0<br>
Here is param[1] -> B<br>
Here is param[2] -> three<br>
Here is param[3] -> dddd<br>
Here is param[4] -> 555<br>
<H1> 12.) Include a file and write outputfile</H1>
<H1> 12.) Done :-)</H1>
<br>
<p><hr>
<small>Embperl (c) 1997-2005 G.Richter</small>
</body>
</html>
|