# untested open my $imagefh, '<', $imageFullPath; binmode $imagefh; my $imagedata = do { local $/; <$imagefh> }; close $imagefh; my $imageBody = $CONFIGURATION->{filekey}=>[$imageFullPath,$imageFileName,'Content-Type'=>$contentType,Content=>$imagedata]];