* David Hodgkinson <daveh at rockitfactory.com> [2004/06/23 21:02]: > I have a code fragment: > > <% FOREACH i = item.keys.nsort -%> > <% IF i != "subsections" -%> > > where the key is a numeric sort order. > > This throws a: > > Argument "subsections" isn't numeric in numeric comparison (<=>) at > /usr/lib/perl5/site_perl/5.6.1/Template/Stash.pm line 212.
nsort is the *numeric* version of the sort. Are you sure you don't want
to try the sort vmethod, which does cmp?
(darren)
--
Maybe this world is another planet's hell.
-- Aldous Huxley
pgpMIdo5HZITV.pgp
Description: PGP signature
