This is really neat++.
As the target is genome work which usually involves large volumes of big strings, using split '[a-z]+', string; to avoid the capture brackets will save a little time.
sub delirium{ my( $string, $qRef ) = @_; $string =~ tr[A-Z][a-z]; $string =~ s/$_/uc $_/ieg for @$qRef; return reduce{ length $a > length $b ? $a : $b } split '[a-z]+',; }
In reply to Re^2: Regexp string concat
by BrowserUk
in thread Regexp string concat
by Murcia
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |