>
> Here is the code for  Execute
> [- Execute ({ inputfile => '/mypath/mylibfile.lib', import => 1 }) -]
> [- TTEST($bb); -]
>    <p>$bb is [+$bb+]</p>
>
> and here is the code inside the lib file
> [$ sub TTEST $]
>    [- $bb = shift; -]
>    [- $aa = 3;  -]
>    <p>$aa is [+$aa+]
>    [- $bb = $aa; -]
> [$ endsub $]
>
>
> Then I got the resule:
> $aa is 3
> $bb is
>
>
> What do you think?
>

Read about how Perl passes parameters :-)

You shift the value of your parameter into $bb, now you modifiy $bb, but $bb
is a variable of it's own, it has nothing to do with the parameter you pass.
Reread my example and write your sub like this:

[$ sub TTEST $]
    [- $aa = 3;  -]
    <p>$aa is [+$aa+]
    [- $_[0] = $aa; -]
[$ endsub $]



Gerald

Reply via email to