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 ...
|