and the $regex value will be something like "A.*A.*A.*".. because I want to match $limit A's in the string. is there any way I can make this more efficiently ?my @ebase = ("A","T"); my $limit = 15; sub lineOK { ($line) = @_; for(@ebase) { $regex = ("$_.*") x $limit; return 0 if($line =~ /$regex/); } return 1; }
In reply to searching characters by Anonymous Monk
For: | Use: | ||
& | & | ||
< | < | ||
> | > | ||
[ | [ | ||
] | ] |