in reply to how to read the line of each record??
while (<>){ $entry = SWISS::Entry->fromText($_); print "Entry $counter\n"; foreach my $one_line (split /\n/,$entry) { # do something with each line now } }
This assumes that the Entry->fromText() method is returning the text from the file in one big string that you simply want to break on newlines.
If you're really going to be processing a bunch of text like this, you may also want to run with use strict and use warnings, test your file opens/reads to make sure they worked properly, and otherwise armor-plate your code.
|
|---|