1
0
mirror of https://github.com/stefanocasazza/ULib.git synced 2025-09-28 19:05:55 +08:00
ULib/tests/examples/docroot/cgi-bin/haserl3.cgi
2015-01-23 17:24:36 +01:00

21 lines
394 B
Perl
Executable File

#!/usr/local/bin/haserl
Content-Type: text/html
<% # define a user function
table_element() {
echo "<td bgcolor=\"$1\">$1</td>"
}
%>
<html>
<body>
<table border=1><tr>
<% for a in Red Blue Yellow Cyan; do %>
<% table_element $a %>
<% done %>
</tr></table>
</body>
</html>
<%# Use Shell defined functions.
Same as above, but uses a shell function instead of embedded html. %>