Re: Proposed correction

2012-09-17 Thread jmrhide-perl
<> I LIKE IT! While brewing tea, it occurred to me to speculate on how a mischievous person would go about killing this script. The one thing that occurred to me is that you could invoke the script with a nonsense value like CATEGORY=bubububu. That would lead to an empty set of terms with insc

Re: Proposed correction

2012-09-17 Thread Jim Gibson
On Sep 17, 2012, at 6:52 AM, Shlomi Fish wrote: > Hi, > > I apologise for having sent that to Dr. Rathbun in private - that was not my > intention but a misuse of software. Resending to the list. > > On Sun, 16 Sep 2012 19:31:01 -0700 (PDT) > jmrhide-p...@yahoo.com wrote: > >> for (my $loopite

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

how to deal with columns in perl

2012-09-17 Thread Wang, Li
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_0002s00200 32150.03134157508611679 POPTR_0002s00200 24150.010

Re: Proposed correction

2012-09-17 Thread Shlomi Fish
Hi, I apologise for having sent that to Dr. Rathbun in private - that was not my intention but a misuse of software. Resending to the list. On Sun, 16 Sep 2012 19:31:01 -0700 (PDT) jmrhide-p...@yahoo.com wrote: > for (my $loopiter = 0; $loopiter < $loopmax; $loopiter++) { #1 > if ($

Re: Proposed correction

2012-09-17 Thread jmrhide-perl
So assuming I write for my $loopiter (0 .. $loopmax) { #1 if ($loopiter >= ($loopmax - 1)) { die "Loop number $loopnum has iterated $loopiter times" } $termnum[0] = int( rand($defnum) ); last unless ( $termnum[0] == $lastnum ); } $loo

Re: Proposed correction

2012-09-17 Thread Shawn H Corey
On Sun, 16 Sep 2012 19:31:01 -0700 (PDT) jmrhide-p...@yahoo.com wrote: > for (my $i = 0; $i < @ary1; $i++) {Leaving aside other concerns, for > the moment, is there a better way to write that first line? You mean: for my $i ( 0 .. $#ary1 ){ # ... } -- Just my 0.0002 millio