Please try one of the existing Perl-based Twitter API libraries:
But for background
Curl & Perl example:
Twitter API account/update_profile_image method:
Make sure you set the content-type appropriately (mime type for the image
format) then include the raw image data per Twitter API
From: apfelmaennchen <alexander.grefr...@gmail.com>
To: Twitter Development Talk <firstname.lastname@example.org>
Sent: Wed, October 21, 2009 2:40:58 AM
Subject: [twitter-dev] upload new profile_picture to Twitter via perl script
Hi, can anybody help me with a perl statement, which uploads the file
'test.jpg' to the TWITTER profile?
I was thinking about some CURLing.
Thanks so much, Alex