#!/usr/bin/perl $| = 1; open ( ADDS, "./additions.tab" ); while ( $line = ) { chomp ( $line ); @div = split ( /\t/, $line ); $blip = 0; # increment integer, keeps track of tab stops foreach my $atom (@div) { @{$lines[$lino]}->[$blip++] = $atom; } $lino++; # increment integer, keeps track of lines } close ADDS; foreach my $Line (@lines) { $dinky = 0; # toggle integer, for existance of duplicates $startat++; # duel use. # 1 Keeps track of already inspected lines, to avoid redoing that work # 2 Let's me see output by printing every few lines foreach my $tick ($startat..( scalar ( @lines ) )) { if ( $lines[$tick]->[1] eq $Line->[1] ) { print (join ( "\t", ( @{ $lines[$tick] } ) )) . "\n"; $dinky++; } } print (join ( "\t", ( @{$Line} ) )) . "\n" if ( $dinky > 0 ); print STDERR $startat . "\n" if ( !( $startat % 100 ) ); print STDERR "(" . scalar ( @lines ) . ")\n" if ( !( $startat % 100) ); } #### 100 (2506) 200 (2606) 300 (2706) 400 (2806) 500 (2906)