I have an array of Paths which i want to read out with Template Toolkit.
How can I access the array Elements of this array?
The Situation is this:

my @dirs;
opendir(DIR,'./directory/') || die $!;
@dirs = readdir(DIR);
close DIR;
$vars-&gt;{'Tree'} = @dirs;


Then I call the Template Page like this:

$template-&gt;process('create.tmpl', $vars) 
   || die "Template process failed: ", $template-&gt;error(), "\n";


In this template I want to make an Tree of the directories in the array. How can I access them?

My idea was to start with a foreach in the template like this

[% FOREACH dir IN Tree.dirs %]
$dir
[% END %]



Question: How well does Python's whitespace dependency interact with source control with regards to merging?
Answer: It works fine so long as everyone on the project has agreed to use the same whitespace style (spaces or tabs).

But I've seen cases where a developer has converted an entire file from spaces to tabs (I think Eclipse had that as a feature, bound to Ctrl+Tab!), which makes spotting diffs near impossible.