Keep in mind that the very last line wont have a comma at the end.key => 44, "key" => "fun. \"yes\" 'fun'", 'key' => 'yahoo\' "fun"'
I'm currently using $text =~ s/'?(\w+)'?\s+=>\s+'?([^']+)'?,?\n/$Data{$1} = $2;/seg; but as you can see it's too limited.
--nutshell
In reply to Regexing a hash line thing by nutshell
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |