#Get Reply Header my %Reply = (); my @reply = &readSocket( \%Reply, $UrlSock ); if( defined $Reply{ 'content-type' } and $Reply{ 'content-type' } =~ m[^(image|application)]is ) { binmode $UrlSock; binmode $Client; }