in reply to How do I upload a file to a https server.

Untested, but try something like this:

$ua->post($url, Content_Type => 'form-data', Content => [ field1 => 'value1', file => ['data.txt'] ] );

Put any fields and values you need to post in there, and change file to the name of the upload field in the form.

I found this info in HTTP::Request::Common