in reply to using map to generate a hash of hash
Can you show your current regex?
You might also want to show more realistic data. E.g. I can't tell if those "a", etc. are really one literal character, as shown, or if those are placeholders for longer, variable patterns. If the former, you should be able to do this: /(abcd)/g Then your map could look like this:
But I suspect that your situation is actually rather more complicated than that.map { my( $a, $b, $c, $d ) = split //; $a => { something => $b, another => $c } }
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Re: using map to generate a hash of hash
by Sihal (Pilgrim) on Nov 07, 2002 at 14:45 UTC | |
by jdporter (Paladin) on Nov 07, 2002 at 14:56 UTC | |
by BrowserUk (Patriarch) on Nov 07, 2002 at 16:46 UTC | |
by Sihal (Pilgrim) on Nov 07, 2002 at 17:24 UTC |