Re: Pre-Processing new template and variables
Dave Howorth <dhoworth-fDajt2Yx3S8pY9vWkoisglpr/1R2p/[email protected]> Thu, 06 Sep 2012 14:56:18 +0100
| Newsgroups | gmane.comp.lang.perl.modules.template-toolkit |
|---|---|
| Organization | MRC Laboratory for Molecular Biology |
| Message-ID | <[email protected]> |
Mark Haney wrote:
> I'm trying to get the INCLUDE_PATH in my template to include a perl
> variable. Here's the code I'm trying to use:
>
>> my $tmplID="epic";
>> my $user_id=`id -u`;
>> if ($user_id = "1000"){my $tmplID = "markh";}
Did you really mean to always assign the string "1000" as the value of
$user_id? Or did you mean
if ($user_id == 1000)
or perhaps
if ($user_id eq "1000")
But that wouldn't account for your script bombing. I think you need to
collect more evidence and/or tell us more.