use 5.010.0; use strict; use warnings; #Read in files if ( @ARGV < 2 ){ say "Please, type in 'perl task2.pl candseqfilename rawseqfilename' and hit enter"; exit ; } open(CANDSEQ, "<", $ARGV[0]) or die "candseqfilename can't be read: please check it: $!"; my ( @candseq, @rawseq, $rawseq ); while(){ chomp; push(@candseq, $_); } #print $_ for @candseq; open(RAWSEQ, "<", $ARGV[1]) or die "rawseqfilename can't be read: please check it: $!"; while(){ chomp; $_ =~ s/^@// if/^@/; push(@rawseq, $_); } #say $_ for @rawseq; for( my $count = 0; $count < @rawseq; $count += 4 ){ for my $candseq( @candseq ){ if( $candseq ~~ @rawseq ){ say "found match"; } } }