in reply to How to extract the different parts of a string stored in a varible?
%header_hash will now have keys are the sip header's name & values are values of the sip header.my @txt_arr = split "\n",$text; my $header_hash{"req_line"} = shift @txt_arr; %header_hash = map { my $v = $_; (split /:/, $v)[0] => (split /:/,$v)[ +1] } @txt_arr;
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: How to extract the different parts of a string stored in a varible?
by Viki@Stag (Sexton) on Jul 07, 2008 at 11:18 UTC |