#!/usr/bin/perl use strict; use warnings; use LWP::Simple::Post qw(post); #binary file open(FH, "binaryfile"); my $Data = do{local $/; }; close(FH); my $url = 'http://localhost:8080/cgi-bin/index.pl'; my $content = post($url, $Data); print $content;