in reply to Write Comments to jpg files

Check out IPTC::Info which allows extraction and importation of IPTC data into JPEG files and Image::Info may also be of use to you.

Replies are listed 'Best First'.