in reply to How to expand a string

$s = 'RAGGTS'; $s =~ s[R][{A,G}]g; $s =~ s[S][{C,G}]g; print while glob $s; AAGGTC AAGGTG GAGGTC GAGGTG

Examine what is said, not who speaks -- Silence betokens consent -- Love the truth but pardon error.
"Science is about questioning the status quo. Questioning authority".
In the absence of evidence, opinion is indistinguishable from prejudice.
"Too many [] have been sedated by an oppressive environment of political correctness and risk aversion."

Replies are listed 'Best First'.
Re^2: How to expand a string
by lima1 (Curate) on Nov 29, 2007 at 16:48 UTC
    ++ nice trick :) didn't know that...