in reply to Re: Parsing Challenge
in thread Parsing Challenge
Yeah, that is more what I was thinking. Here is a similar method:
- tye (but my friends call me "Tye")my $key; for( split /(?<==)/, $input ) { # Split after each "=" s#(^|\s+)(\S+)=$##; # Remove trailing key if( defined $key ) { # Not first time thru: $hash{$key}= $_; } $key= $2; # Note next key to use. }
|
|---|