in reply to Re: How to extract the different parts of a string stored in a varible?
in thread How to extract the different parts of a string stored in a varible?

sorry abt the mistake... i had not noticed ':' in the header values. Consider this code ...
my @txt_arr = split "\n",$text; chomp @txt_arr; my $header_hash{"req_line"} = shift @txt_arr; %header_hash = map { (/(.+?):/) => (/.+?:(.*)/) } @txt_arr;


http://techdiary-viki.blogspot.com/
  • Comment on Re^2: How to extract the different parts of a string stored in a varible?
  • Download Code