[Omaha.pm] Search and replace

Jay Hannah jay at jays.net
Thu Sep 4 11:52:50 PDT 2008


Andy Lester wrote:
> Roughly this:
>
> $seq =~ s/($search_string)/translate($1)/e;
>
> sub translate {
>     $_[0] =~ tr/A-Z/a-z/;
>     return $_[0];
> }
>
> That should work, although there may be a slick way to do it w/o the 
> func call.

Ya, but it needs to go both ways. Upper to lower, and lower to upper.  :)

Cause that's how we roll.

:)

j



More information about the Omaha-pm mailing list