in reply to MIME format x-www-form-urlencoded

CGI::escape doesn't seem to do the job. I need each space character converted into a plus sign, not %20.

IIRC that shouldn't matter: + and %20 are equivalent. Maybe URI::Escape does what you want, though.