#!/usr/bin/perl -w use Tie::File; tie @array, 'Tie::File', 'BlastOutput_2.txt' or die ("Could not open File"); print "opened file and stored content in array \n"; $even = 2; $odd = 1;     $oddfurther = 3; print "intialized variables unique \n"; print "\n"; for ($count = 0, $count <= $#array, $count += 2) {      #count from the first line to the last line in the file print "entered for loop \n";                                         print "trying to perform 1 if \n"; &n bsp; &n bsp;    if ($array[$count] eq $array[$even] && $array[$odd] eq $array[$oddfurther]) { #0 eq 2 && 1 eq 3 => delete both    print "entered 1 if condition \n";        splice (@array,$even,1); &n bsp; #delete 2        splice (@array,$oddfurther,1); &n bsp; #delete 3    print "trying to perform 2 if \n";    if ($array[$count] eq $array[$even] && $array[$odd] ne $array[$oddfurther]) {  #0 eq 2 && 1 ne 3 => delete 2    print "entered 2 if condition";        splice (@array,$even,1); &n bsp; #delete 2 } } $even += 2;     #starts with 2 and becomes 4 aso.. $odd += 2; #starts with 1 and becomes 3 aso.. $oddfurther += 2; #starts with 3 and becomes 5 aso.. print "increased variables \n"; print "\n"; }