[ic] Temporary $Scratch

Spencer Christensen schristensen at backcountry.com
Mon Jul 31 18:36:01 EDT 2006


Grant wrote:
> How can I set a $Scratch->{variable} to not persist onto the next page
> like [tmp] and [tmpn] when it's written in Perl inside [calc], [perl],
> or a UserTag?

Grant,
    You can call the tmp and tmpn tags like any other usertag from 
within calc and perl blocks like this:

[perl]
my $x = "blah blah";
$Tag->tmpn( 'my_tmpn_scratch_var' => $x);
return;
[/perl]

[scratch my_tmpn_scratch_var]

    Make sense?


-- 
Spencer Christensen
Infrastructure Engineering Team Leader
(801) 746-7580 x101
www.Backcountry.com
We use the gear we sell.


More information about the interchange-users mailing list