[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Omaha.pm] Search and replace



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