@@
@# You can embed any perl code in your text:
-@[foreach $x (1..10) { print "$x "; } ]
+@[foreach $x (1..10) { out "$x "; } ]
@# Or if you use @{...}, then the value of the last expression executed
@# gets printed automatically:
@# You can also interpolate perl variables by using @$variable:
I was run as @$0.
-@# It is possible to call any perl functions (result will be discarded):
-@print("One", "Two", "Three\n")
+@# It is possible to call any perl functions
+@# (any result other than undef will be printed automatically)
+@# Use `out' to write to the output stream
+@out("One", "Two", "Three\n")
@# Or do the same with parameters running up to the end of the line:
-@print "Four", "Five", "Six\n"
+@out "Four", "Five", "Six\n"
@# There are also some conditionals (you can use any perl expressions):
@if 1
@load "test3"
@# This one is tricky:
-@print("z\n", <<EOF
+@out("z\n", <<EOF
a
b
c