To get the shortest-to-longest length ordering from the approach I outlined here, just use a ? "lazy" modifier on the quantifier of the \w* "padding" sub-pattern making it \w*?:
qr{ ATG \w*? (?: TAG | TAA | TGA) }xms;
Give a man a fish: <%-{-{-{-<
In reply to Re^3: Using Recursion to Find DNA Sequences
by AnomalousMonk
in thread Using Recursion to Find DNA Sequences
by clueless_perl
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |