in reply to String Substitution...

Does this produce the required result?

$s = q[ZZ<<;ght;''d;\r\n\t\t\t\t\t;$_;LicBpack;'c*'y=eval;perl$@pop&&d +ie@;D9];; $s =~ s[$_][]g for map quotemeta, qw[ y << ; pack = eval @ && die], '\n', '\r', "'c*'", "''", '$_';; print $s;; ZZghtd\t\t\t\t\tLicBperl$popD9

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: String Substitution...
by acidblood (Novice) on May 16, 2008 at 09:37 UTC
    Thank you to all!

    Your wisdom has enlightened me. I tested the other solutions and they seemed to work, but I went with the code from BrowserUk, slim-line and easy to tweak to my requirements.

    My big problem was just to avoid the "map quotameta" and special characters!

    I am a happy monk! :-)