in reply to comparing two amounts of money.

You should probably take a look at the module Math::Currency module available at CPAN. It may be able to do a lot of the things you're looking for without having to do any extra work.