|Pathologically Eclectic Rubbish Lister|
Convert string to data structureby Dirk80 (Monk)
|on Sep 21, 2012 at 15:25 UTC||Need Help??|
Dirk80 has asked for the
wisdom of the Perl Monks concerning the following question:
possibly this is an easy thing. But I don't get it. So I'm interested in your answers.
Here my string:my $str = "1. ...... AB_CD 1.1 ...... EF_GH 1.2 .... IJ_KL_MN 2. ............ OPQR";
And here what I would like to have:
I tried a lot of things with split. And I often came near to the desired result. But as said before. I didn't get it completely correctly.
Example I tried: split(/\s\.+\s/, $str);
Thanks alot for your help.