Most Perl user agent modules allow you to create POST request with arbitrary body content, and of course you can also set headers the way you want. So you could write, for example:
my $headers = HTTP::Headers->new();
$headers->header('Content-Disposition', 'form-data; name="fileBody"; f
+ilename="[Placeholder file name]");
my $ua = LWP::UserAgent->new(
default_headers => $headers,
my $response = $ua->post($URL, Content => $content_of_your_file);
I hope that helps. If not, please reformulate your question.