[ic] variables
Jon Jensen
jon at endpoint.com
Fri Jul 29 18:15:51 EDT 2005
On Thu, 28 Jul 2005, JT Justman wrote:
>> Okay this should be easy, but I don't know enough about Interchange or Perl.
>> I'm just trying to make a basic variable that I can put into some html code,
>> this is what I'm trying to do:
>>
>> [perl]
>> $site = "icdevgroup";
>> return $site;
>> [/perl]
>>
>> <html>
>> <a href="www.$site.org">ICDEVGROUP.ORG</a>
>> </html>
>>
>> I can't get this to work, anyone have any idea on how I should go about
>> this. Sorry for the basic question.
>>
>> Thanks,
>> Brian
>
> Hi, Brian. Maybe I can help you get on the right track.
>
> Variables that you define within a [perl] tag only exist within that
> tag.
That's actually not true ... variables not otherwise scoped are
auto-created package variables visible throughout the page. This works
fine:
[calcn]
$site = "icdevgroup";
return;
[/calcn]
<a href="http://www.[calcn] $site [/calcn].org">ICDEVGROUP.ORG</a>
I'm not recommending this technique for this scenario, but it does work
and occasionally has its uses.
Jon
--
Jon Jensen
End Point Corporation
http://www.endpoint.com/
More information about the interchange-users
mailing list