in reply to PERL STRING QUESTION
#!/usr/bin/perl -l my $seq = "atgtagat"; my $find = "gta"; my ($before, $after) = $seq =~ /(..)$find(..)/; print "before: $before"; # "at" print "after: $after"; # "ga"
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: PERL STRING QUESTION
by AnomalousMonk (Archbishop) on Apr 01, 2010 at 08:20 UTC | |
| A reply falls below the community's threshold of quality. You may see it by logging in. |