in reply to pattern matching
You could try something like this
use v5.14; use warnings; my @values = ( qw/XYZATGCACGTGFVGFCCV YZXCVFDCXZATGCXCCXZZSDD/); for my $v (@values) { my ($pre) = $v =~ m/^(.*?)ATGC/; say $pre; }
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: pattern matching
by Anonymous Monk on Feb 10, 2012 at 14:15 UTC |