in reply to Converting a string to a C like pointer to a 0-terminated string
That sounds really strange, I believe that "Pass a pointer to a zero terminated string as parameter" only applies to the C interface. In Perl examples to libcurl, I don't see strings sent to $curl->setopt() treated in any special way. So my guess would be to simply use $curl->setopt(CURLOPT_KEYPASSWD, 'password');