I have another file containing positions of paragraph text I need to retain, relative to the top line (ab) of the paragraph0 10 ab hellothere 4 5 ac notimportant 2 3 ad notimportant 10 23 ab hellloagainhellloagainnn 4 5 ac notimportantnotimportant 2 3 ad notimportantnotimportant
so the first line says to keep the text up to position 20 (keeping paragraph structure)0 20 40 60 100 120
Then I would need to keep the text from position 40 to 60, and so on. So I need to filter the text based on the positions in the second file (which gives the co-ordinates of the filtered text relative to the first line in the paragraph). Hopefully this makes sense. I am already reading in the data 1 paragraph at a time and processing the resulting text. the paragraph text and names is read into an hashhellothere notimportant notimportant hellloagainhellloagai notimportantnotimport notimportantnotimport
I was hoping somebody may have an idea for some kind of filter before it is put into the hash, the tricky bit for me is using the info in the second file. Many thanks!my %seqs foreach my $sline (@slines){ my($start,$size,$name,$text) = split /\s+/, $sline; $seqs{$name} = $text; }
In reply to filter one file based on another by coldy
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |