Andy wrote:
> Bit of a kludge I'm afraid. There probably should be some easier way to
> do this. Suggestions welcome...
My best solution would to be to have a .number virtual method. Then you
could do:
month = 2;
splitmonth = "02";
IF splitmonth.number == month.number
So you're still always using string comparison, but you convert the number
to a cannoical form first.
I'd be loathed to add further virtual methods as standard though. Maybe
we could do with a plugin somewhat like Scalar::Util that adds many
virtual methods that are virtually 'core' but arn't mainly to stop feature
creep.
Comments?
Mark.
--
#!/usr/bin/perl -T
use strict;
use warnings;
print q{Mark Fowler, [EMAIL PROTECTED], http://twoshortplanks.com/};
_______________________________________________
templates mailing list
[EMAIL PROTECTED]
http://lists.ourshack.com/mailman/listinfo/templates