Re: Fwd: how to parse complex table

2011-04-25 Thread galeb abu-ali
thanks Peter, code looks elegant now! "like chiseling away everything that is not David from a block of marble :-) " very cool reference!

Re: Fwd: how to parse complex table

2011-04-24 Thread Peter Scott
On Sun, 24 Apr 2011 18:14:52 -0400, galeb abu-ali wrote: > I revised the code to the following: [...] > for my $file( @ARGV ) { > open( my $IN, "<", $file ) or die "Failed to open: $!\n"; > > my( %cog_cat, %cog_id, @cogs, $oid, $locus, $source, $cluster_info > ); > > while( my $li

Fwd: how to parse complex table

2011-04-24 Thread galeb abu-ali
Mike, many thanks for the help, particularly your comments which were as valuable as your code! I revised the code to the following: #!/usr/bin/perl # parse_IMG_gene_info4.pl use strict; use warnings; for my $file( @ARGV ) { open( my $IN, "<", $file ) or die "Failed to open: $!\n"; my