in reply to Re: Search and replace text
in thread Search and replace text

Here are a couple of ways:

print join'',map{ chr 97+rand(6) } 1 .. 2 for 1 .. 100; ## Slightly wasteful, but you only do it once ## and reuse the array each time. my @pairs = grep{ /[a-f]{2}/ }'aa' .. 'ff'; print $pairs[ rand @pairs ];

Examine what is said, not who speaks -- Silence betokens consent -- Love the truth but pardon error.
Lingua non convalesco, consenesco et abolesco. -- Rule 1 has a caveat! -- Who broke the cabal?
"Science is about questioning the status quo. Questioning authority".
In the absence of evidence, opinion is indistinguishable from prejudice.