#!/usr/bin/perl

open(MYFILE, "temp2.txt") or die "can't open file";

unlink("logit.txt");

open (WRITEFILE, ">>logit.txt") or die "can't open file: $!";

$/ = "\r\n";

$ctr = 0 ;
$myVar="";

foreach(<MYFILE>)
	{
		$ctr++ ;
		print "$ctr\n";
		chomp;
		print "$_\r\n" ;
		if ($myVar eq "") {
			$myVar = "$_";
		} else {
	
			$myVar = "$myVar\t$_" ;
		}


		if ($ctr==10) {
			$ctr = 0;
			# print "$myVar\r\n" ;
			print WRITEFILE "$myVar\r\n";
			$myVar = "";
		}
		
	}

#print WRITEFILE $myVar;
