- Apr 5, 2005
- 12,150
- 773
- 126
Hi all,
it's late and my brain isnt functioning right, if any of you guys can help me i would greatly appreciate it.
i am basically just trying to to a find and replace in perl, and then outputting the result to a file.
i have got $temp="foo";
i have the variable $_ = "Bunch of text";
i want to replace "text" w/ the string stored in $temp.
i've tried using a regular expression, s/text/$temp
but in my output file i get Bunch of $temp
but i would like to have Bunch of foo
how would i go about doing this?
it's late and my brain isnt functioning right, if any of you guys can help me i would greatly appreciate it.
i am basically just trying to to a find and replace in perl, and then outputting the result to a file.
i have got $temp="foo";
i have the variable $_ = "Bunch of text";
i want to replace "text" w/ the string stored in $temp.
i've tried using a regular expression, s/text/$temp
but in my output file i get Bunch of $temp
but i would like to have Bunch of foo
how would i go about doing this?
