in reply to Re: Parsing Challenge
in thread Parsing Challenge
Since "key=" is easy to recognize, another way would be to use split:foreach (split " ", $data) { if (/^([^=]*)=(.*)/) { $hash{$last=$1}=$2 } elsif (defined $lastkey) { $hash{$last} .= " $_" } }
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Re: Re: Parsing Challenge
by blue_cowdawg (Monsignor) on May 24, 2001 at 22:39 UTC |