I have some data that I need to analyze. The data is multilined and each block is separated by a newline. So, it is something like this
Property 1: 1234
Property 2: 34546
Property 3: ACBGD
Property 1: 1234
Property 4: 4567
Property 1: just
Property 3: an
Property 5: simple
Property 6: example
I need to filter out those data blocks that have some particular Property present. For example, only those that have Property 4, only those that have Property 3 and 6 both etc. I might also need to choose based upon the value at these Properties, so for example only those blocks that have Property 3 and its value is 'an'.
How would I do this in Perl. I tried splitting it by "\n" but didn't seem to work properly. Am I missing something?