Content-type: text/html Perl Tag

Home
WebGroove is no longer supported. These docs are reference only.


Perl Tag
The Agent tag executes a chunk of inline Perl code. This allows you to do math, complex assignments, regular expressions and the like. Anything valid in Perl is valid here. All Perl blocks occupy the same dataspace, and you can define and use subs as well as use modules. We recommend wrapping a compiler macro around complex Perl operations to provide a simple interface between HTML, WebGroove® Script and Perl.

Example
<perl>
my $i;

$i = "something dumb and " . {item:name};
wgprint $i . " with " . 15 * $item{age};
</perl>


Notice that (unless you've done something with the agent tag) you may use Perl hash and Agent variable references interchangably. You can also see some decent Perl in action in our macro library.

Syntax
The perl tag must be used as a tag pair only.
Attributes
exit=spot to jump to if this Perl block returns false.


More
Agent Subroutines
Spot Tag

See Also
Perl Resources

Up To
Agent Tags
Complete Tag Reference


WebGroove® is a registered trademark of Creativision Publishing Corporation