Don't use $&, it will slow down every regular expression in the program.
my $string = "CCATGNNNTAACCNNATGNNTAGCC"; while ( $string =~ /([AG]TG.*?T[AG][AG])/ig ) { print "matched at $-[0]: $1\n"; }
In reply to Re^2: Request to correct the perl code for getting substrings
by jwkrahn
in thread Request to correct the perl code for getting substrings
by supriyoch_2008
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |