in reply to How can I calculate the right combination of postage stamps?

This isn't related to Perl but to the postage aspect of your problem.

Those 24-cent stamps come in handy if you ever need to send first-class mail in large envelopes. The first ounce is $0.83, or 42 + 24 + 17.

First-class international letter to Group 1 destinations is $0.72 for the first ounce, so three of those is just right. Additional ounces internationally are $0.24 for Group 1 destinations as well up to 3 ounces. A 3.5 ounce letter is an additional $0.24 over a 3-ounce one.

You're probably already aware, but for the curious there is a USPS price guide at with a page each for Domestic First Class Mail and many of the other rate types.