in reply to Re^3: insert data into data structure
in thread insert data into data structure

sorry, i wrote it fast, the right regex is  ($line =~ /^\[.+\]$/) i didn't put the tag of code.

Replies are listed 'Best First'.
Re^5: insert data into data structure
by GotToBTru (Prior) on Nov 30, 2015 at 13:48 UTC

    Your example data doesn't show the square brackets. Can you give a better example of what your data looks like?

    Based on your description, a hash of hashes sounds like what you want, since the key to picking out the data you want is a string like "Paragraph5". If the search string is a hash key, getting the related values is simple and very fast.

    Dum Spiro Spero
Re^5: insert data into data structure
by AnomalousMonk (Archbishop) on Nov 30, 2015 at 17:26 UTC
    ... i didn't put the tag of code.

    Because you posted this as a registered user, you can go back and edit the post to add code tags. Please see How do I change/delete my post?.


    Give a man a fish:  <%-{-{-{-<