hi,
I am new to perl programming.I am trying with the following script and
need help for it.

I consolidated 10 excel files(in .txt format) which has same headers
in it and so i made it 1 common header at the top.While doing it,in
final output file i see a blank row at the beginning of every file
consolidated.I wanted to get rid of it and to be displayed all in a
single file.

Sample Script:

while(<FILE>) {
                        if (($k ==0) and ($Line_Counter ==1)) {
                                my @F=split(/[\t]+/, $_);
                                print CONSOL_FILE "$F[0] \t $F[1] \t $F[2] \n";
                                }
                        if (($k >=1) and ($Line_Counter>1)) {   # doesnt print 
headers
                                $Line=$_;
                                my @F=split(/[\t]+/, $Line);
                                print CONSOL_FILE  "$F[0] \t $F[1] \t $F[2] \n";
                                }
$Line_Counter = $Line_Counter + 1;
                        }
        close FILE ;
note:tab is the delimiter used here.

Any help is Appreciated.


-- 
To unsubscribe, e-mail: beginners-unsubscr...@perl.org
For additional commands, e-mail: beginners-h...@perl.org
http://learn.perl.org/


Reply via email to