in reply to Re: checking output for text
in thread checking output for text

another way without making use of a module would be to define a hash or array with the values you wanted to find (I think I would use a hash)... If I noticed correctly all the lines you are intested in start with your 'key' and a colon so
%to_find = ( 'Set-Cookie' => '1', 'Server' => '1', #etc so on and so forth ); while (<$socket>) { # split on the first colon, but leave the rest alone ($key,$rest) = split(/:/, $_, 2); print "$key: $rest\n" if ($to_find{$key}); }