in reply to Initialize an hash with string
You did not describe the *general* syntax of your file (for example, how keys can look like, and how spacing and lineout can vary), but from your posting, your code looks already very close to Perl. One possibility might be to transform the file into *real* Perl code (putting a comma between the hash elements, and placing a pair of curly brackets around the whole text) and then using do to evaluate the file.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: Initialize an hash with string
by Anonymous Monk on Jun 21, 2012 at 09:58 UTC | |
by rovf (Priest) on Jun 21, 2012 at 12:30 UTC | |
by Anonymous Monk on Jun 21, 2012 at 13:06 UTC | |
by rovf (Priest) on Jun 21, 2012 at 14:26 UTC |