Mistři v programování na #hovnokod

Perl #515

@lib_001=('A','G','C','T','A');
@lib_002=('C','T','A','A','G');		 
@lib_003=('T','G','C','A','T');

$string=<FILE>;
@sequence=split("",$string);
@code=@sequence[-7..-3];
		
if((join('',@lib_001) eq join('',@code)) or
    (join('',@lib_001[0..3]) eq join('',@code[0..3])) or
    (join('',@lib_001[1..4]) eq join('',@code[1..4])) or
    (join('',@lib_001[0,1,2,4]) eq join('',@code[0,1,2,4])) or
    (join('',@lib_001[0,2,3,4]) eq join('',@code[0,2,3,4])) or
    (join('',@lib_001[0,1,3,4]) eq join('',@code[0,1,3,4]))) 
	{$tag=join('',@code);
	 $closest_tag=join('',@lib_001);}
			
elsif((join('',@lib_002) eq join('',@code)) or
     (join('',@lib_002[0..3]) eq join('',@code[0..3])) or
     (join('',@lib_002[1..4]) eq join('',@code[1..4])) or
     (join('',@lib_002[0,1,2,4]) eq join('',@code[0,1,2,4])) or
     (join('',@lib_002[0,2,3,4]) eq join('',@code[0,2,3,4])) or
     (join('',@lib_002[0,1,3,4]) eq join('',@code[0,1,3,4]))) 
	{$tag=join('',@code);
	 $closest_tag=join('',@lib_002);}
		
elsif((join('',@lib_003) eq join('',@code)) or
     (join('',@lib_003[0..3]) eq join('',@code[0..3])) or
     (join('',@lib_003[1..4]) eq join('',@code[1..4])) or
     (join('',@lib_003[0,1,2,4]) eq join('',@code[0,1,2,4])) or
     (join('',@lib_003[0,2,3,4]) eq join('',@code[0,2,3,4])) or
     (join('',@lib_003[0,1,3,4]) eq join('',@code[0,1,3,4]))) 
	{$tag=join('',@code);
	 $closest_tag=join('',@lib_003);}

else
	{$tag=join('',@code);
	  $closest_tag='NONE';}

HovnoKod,