in reply to Re: overloading '0+'
in thread overloading '0+'

Thanks for all of the replies, guys.

I had read the documentation (numerous times) but found it difficult to understand.

Overloading '0+' is really overloading numification. So everytime you use $soldier1 in a context where it is used as a number, you call truncate ...

That's the bit I was failing to understand. Things now start to fall into place.

If I understand correctly, there's really no advantage in overloading '0+' unless one has a single subroutine that caters for a variety of overloadable numeric operations ?

Cheers,
Rob