All, 

I am trying to figure out how to print 8 scalers/elements then \n,  then 5 
more lines of 8 or less for a max total of 40  Here is my code: 

print FILEOUT "eject 0,0,0 ";
my $count = `wc -l <$ejectapes`;

if ($count <= 40 ) {

        while(<FILE>) {
                chomp $_;
                print FILEOUT "$_ ";   # if 1..8
                #print substr($a,0,7);
        }
close (FILEOUT);

}


The substr is sort of what I want, but is sprintf possible ...what should 
I use?  Here is what my end results will look like if I had a file with 40 
E strings:

Exxxx Exxxx Exxxx Exxxx Exxxx Exxxx Exxxx Exxxx  \n
x5 \n

anything less but  it cannot exceed 8 per line:

Exxxx Exxxx Exxxx Exxxx Exxxx Exxxx Exxxx Exxxx  \n
Exxxx ..... \n


thank you, 
Derek B. Smith

Reply via email to