Three methods: read newline delimeted two at a time, read the whole thing
and process it in pairs of lines or read twice the size of a fixed-length
line from columnar data:
while(<>)
{
my $line = $_ . <>;
...
}
or
my @linz = <>;
for( my $i = 0 ; $i < @linz ; $i += 2 )
{
my @twolinz
I know that this is not the forum to ask perl questions. But is there some
one who can help me on how to read two lines at a time using
a Perl script
My script looks like this :
open(FILE_IN, "<$datafile") or die "Cannot open $datafile...\n";
while()
{ chomp;
@fields = split(/;/