Re: substitute character in variable

2003-09-12 Thread Robin Norwood
"Michael Goodman" <[EMAIL PROTECTED]> writes: > 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. Michael, It's usually better to post a code example so that we can see w

Re: substitute character in variable

2003-09-12 Thread James Edward Gray II
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/RE

Re: substitute character in variable

2003-09-12 Thread Rob Dixon
Hi Michael Michael Goodman wrote: > > Pardon my ignorance but, This is a beginners list :) > 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. use strict; use warnings; my $variable = "A and B a

RE: substitute character in variable

2003-09-12 Thread Marcos . Rebelo
give one example -Original Message- From: Michael Goodman [mailto:[EMAIL PROTECTED] Sent: Friday, September 12, 2003 3:27 PM To: [EMAIL PROTECTED] Subject: substitute character in variable Pardon my ignorance but, How do you parse a variable to find every occurrence of a string and

substitute character in variable

2003-09-12 Thread Michael Goodman
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. Thanks, -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]