#!/usr/bin/perl # http://perlmonks.org/?node_id=1201579 use strict; use warnings; my $haystack = 'AGCTTCTTGCTTCTTGC'; my $needle = 'GCTTCTTGC'; my @positions; push @positions, $-[0] + 1 while $haystack =~ /(?=$needle)/g; print "@positions\n";
In reply to Re: Double check for positions
by tybalt89
in thread Double check for positions
by bisimen
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |