Re: inserting a forward slash into a variable

2001-10-28 Thread fliptop
Guy Tubbs wrote: > > Can anyone tell me how to insert a forward slash '/' into a variable when > searching and replacing. > > If you look below I'm trying to search for 'booking2.html' then replace it > with 'http://xxx' etc, but I get an error when it's run. > > $line=~s/booking2.html/http:///

inserting a forward slash into a variable

2001-10-28 Thread Guy Tubbs
Hi, Can anyone tell me how to insert a forward slash '/' into a variable when searching and replacing. If you look below I'm trying to search for 'booking2.html' then replace it with 'http://xxx' etc, but I get an error when it's run. $line=~s/booking2.html/http:www.mysite//booking2.html/g;