in reply to Parse string for fields

Do you really want to lose the bits at the end?

To smash the extra pluses, leaving all the other info intact, do this:

tr/+/+/s;
Otherwise it looks like shenme's got you covered below.