Re: how to deal with columns in perl

2012-09-17 Thread Jim Gibson
On Sep 17, 2012, at 3:23 PM, Chris Stinemetz wrote: > Sorry forgot you wanted the average. > Revised program is below: > > #!/usr/bin/perl > > use strict; > use warnings; > use Data::Dumper; > > my %hash; > my $counter; > > while ( my $line = ) { > >my @record = split( /\s+/, $line ); >

Re: how to deal with columns in perl

2012-09-17 Thread Chris Stinemetz
Sorry forgot you wanted the average. Revised program is below: #!/usr/bin/perl use strict; use warnings; use Data::Dumper; my %hash; my $counter; while ( my $line = ) { my @record = split( /\s+/, $line ); ## check to see if we've already added the 3rd column to the hash ## if we

Re: how to deal with columns in perl

2012-09-17 Thread Chris Stinemetz
On Mon, Sep 17, 2012 at 1:29 PM, Wang, Li wrote: > Dear List members > > I have three columns of a table. The example is as follows: > > DBS R^2 genename > 801 0.27807486057281494 POPTR_0002s00200 > 19031.0 POPTR_0002s00200 > 11030.25852271914482117 POPTR_0002s0020

Re: how to deal with columns in perl

2012-09-17 Thread David Precious
On Mon, 17 Sep 2012 18:29:34 + "Wang, Li" wrote: > Dear List members > > I have three columns of a table. The example is as follows: > > DBS R^2 genename > 801 0.27807486057281494 POPTR_0002s00200 > 19031.0 POPTR_0002s00200 > 11030.25852271914482117 POPTR_00