Hi all,
I have file whose content is arranged in rows of two lines, each row-pair
separated from the next by a line-space.
I want to rearrange the file in a two-column format such that all the
entries in the first rows in a pair are put in the first column while their
corresponding second rows
Hello Kenneth,
Wednesday, January 29, 2003 you wrote:
KJM Given the content of a file as:
KJM
KJM
KJM
KJM
KJM
KJM
KJM I want it rearranged in the following format using Perl:
KJM
KJM
KJM
one way:
open(FIN, $fpin) or die no
my $cnt = 1;
while (DATA) {
next unless /\w/;
s/\n/\t\t/ if ($cnt++ % 2);
print;
}
__DATA__
More homework?
a
Andy Bach, Sys. Mangler
Internet: [EMAIL PROTECTED]
VOICE: (608) 261-5738 FAX 264-5030
... even if you're mediocre/decent at perl [the cmecf]