in reply to Parsing multiple values in a singe line
That will get everything to the right of the = into the %data hash. You may need to process this data further (such as removing what look like /comments as well as dealing with the quotes.my @lines = grep(defined, split(/.{80}/, $data)); my %data; foreach (@lines) { last if(/^END /); if(/^([^\s]+)\s*=\s*(.*?)\s*$/) { $data{$1} = $2; } }
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
(tye)Re: Parsing multiple values in a singe line
by tye (Sage) on Apr 06, 2001 at 00:06 UTC |