open my $FH, '>', 'image.jpg'; binmode $FH; print $FH $resp->content; close $FH;