____________#!/usr/bin/perl -w use strict; my $fields_per_record = 4; while(<>) { chomp; my @records = split " ", $_; if(@records < $fields_per_record) { last if not defined (my $next = <>); $_ .= $next; redo; } print "@records\n"; }
In reply to Re: Converting data from file with multiline records
by Aristotle
in thread Converting data from file with multiline records
by Bilbo
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |