[ic] Function inside user tag

Peter peter at pajamian.dhs.org
Fri Nov 23 07:42:30 EST 2007


On 11/23/2007 03:28 AM, Marco Mescoli wrote:
> Is it possible declare and call a perl function inside user tag ?
> Digged mailing list without any example ...

I usually do something like:

...................

# Declare sub foo
my $foo = sub {
	my ($bar, $baz) = @_;
}


# Call foo
&$foo($bar, $baz);

...................


I think you can also just declare the sub and call it, but I've never
tried it.  I know the above works, though.

Peter


More information about the interchange-users mailing list