On Friday, September 12, 2003, at 08:27 AM, Michael Goodman wrote:

Pardon my ignorance but,

How do you parse a variable to find every occurrence of a string and
replace the string with another. I tried using ~s/ but it doesn't work.

For replacing a string, you want:


$variable =~ s/STRING/REPLACEMENT/g;

Just remember that's a Regular Expression, so some characters have special meaning in there. Good luck.

James


-- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]



Reply via email to