use lib "/d/user2/aszend01/BCII/240213"; use ModuleMatching; my $locus_acc_no; while (my $line = <>) { # locus_acc_no if ($line =~ ModuleMatching::MatchLAC($locus_acc_no)) { unless (ModuleMatching::MatchLAC($locus_acc_no)){ print "something is wrong with the matching", "\n"; next; } } print $locus_acc_no, "\n"; } # This module will be called from the myparserM.pl. It will pull out the locus_acc_no. package ModuleMatching; use strict; # Here are the matchig code for the locus_acc_no (LAC) sub MatchLAC($) { return $_[0] =~ /^LOCUS\s{7}(\w+)\s+\w+/; } 1;