Bryan wrote:
> If I have some sequence data:
> my $seq = "AGCCTCAAAGTTCGG";
>
> and some subset:
> my $subset = "CAAAGTTC";
>
> I want to first, match the pattern to see if $subset is found in $seq
> (which is fine), but then I also want to know the starting and end
> positions of the match in the original sequence, i.e. start = 6, end =
> 13, is there something (like backreferences) fromt the regex that will
> give me this info? Or....?
>
Start = length($`) + 1
End = length($`) + length($&)
Alternatively, end = length($`) + length($subset)
See perldoc perlvar for documentation on $`, $' and $&.
Cheers,
Rob

To reply by email u have to take out the u in kalinaubears.
