M wrote:
> It all works fine apart form the uniquing stage which does nothing
That's most puzzling. list.unique definitely works (for the
definition of "works" that I just tried):
[EMAIL PROTECTED] ~] tpage
[% list = [10 20 10 11 1 20 21 'foo' 'Foo' 'bar' 'foo'];
list.unique.join
%]
^D
10 20 11 1 21 foo Foo bar
It's so trivially simple that I can't see anything that can
go wrong with it. Unless I'm missing something obvious...
sub list_unique {
my %u;
[ grep { ++$u{$_} == 1 } @{$_[0]} ];
}
> I've solved my problem by adding a DISCRETE to the SQL
That's the better solution, I think. But it's still very puzzling as
to why list.unique wasn't working. Could it be that your data wasn't
exactly the same? Perhaps some elements had leading or trailing
whitespace that differentiated it enough to make it non-unique?
Bit of a wild guess, I'm afraid.
A
_______________________________________________
templates mailing list
[email protected]
http://mail.template-toolkit.org/mailman/listinfo/templates