1. Please update your posts and delete all but one copy of your data.

2. For the one copy add "readmore" tags around it so that it doesn't take so many lines of the display.

3. This is a PubMed search result. You should be using PubMed E-Utilities for this stuff. You can get an HTML result instead of this textual representation. Please read terms of use carefully and note that there are a number of Perl utilities to assist you. Search in Google for "PubMed tools" also.

4. Please be specific and actually try the directions that you are giving us, e.g. I presume you meant LOCUS instead of LOCAL as the start-of-record.

5. Your data contains 2 records. The code below will separate them using the "flip-flop" operator Past that, I have no idea of what you want to do.

6. For reference on flip-flop operator read this thread: Flipin good, or a total flop?.

#!/usr/bin/perl -w use strict; use Data::Dumper; my @this_record; #lines of the record my @records; #array of array while (<DATA>) { chomp; if (my $line = m|^LOCUS|...m|^//|) { if ($line =~ m/E0$/) #don't push the trailing "//" { push (@records, [@this_record]); #record complete @this_record = (); } else { push (@this_record,$_); #just another record line } } } print Dumper \@records; __DATA__ LOCUS NP_644805 770 aa linear PRI 06 +-FEB-2011 ...following lines deleted for brevity ...

In reply to Re^3: it should be simple enough... by Marshall
in thread it should be simple enough... by lomSpace

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.