Re: I need your help

2001-12-29 Thread Roger C Haslock
'^' indicates the beginning of a line, '$' indicates the end will s/^$name$/#$name/ do what you want? - Roger - - Original Message - From: "Jose Vicente" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Saturday, December 29, 2001 1:26 AM Subject: I need your help > Hi friends. >

Re: I need your help

2001-12-28 Thread Leon
- Original Message - From: "Jose Vicente" <[EMAIL PROTECTED]> > Hi friends. > I am replacing a string using s///, in the following way:, but I only > need and exact string to be replaced, for example if I have a file with the > following strins: > amor > alto > a > bacho > And execute

Re: I need your help

2001-12-28 Thread Connie Chan
if you are reading these string from a file, I suppose there is a \n at eol... so. how about like this ? ~s/^$name\s/\#$name/g have a nice day =) - Original Message - From: "Jose Vicente" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Saturday, December 29, 2001 9:26 AM Subject:

RE: I need your help

2001-12-28 Thread Daryl J. Hoyt
How about: if($string eq $name) { $string = "#".$string; } Daryl J. Hoyt Performance Engineer Geodesic Systems 312-832-2010 -Original Message- From: Jose Vicente [mailto:[EMAIL PROTECTED]] Sent: Friday, December 28, 2001

Re: I need your help

2001-12-20 Thread Shawn
Hey Jose, The open file is a basic concept that should be easy to pick up. I will give you the fish, and maybe someone else will be kind enough to teach you how via perldoc (I still am lost in the internal docs)... my $new_file; open(FILE,') { $line=~s/WORD_TO_REPLACE/REPLACEMENT_WORD/g; $

RE: I need your help

2001-12-20 Thread John Edwards
That can be viewed as two problems with the same answer. When you find word1, replace with your new word. When you find word2, replace with nothing, hence deleting it. Tip, look up docs on the s/// or substitute method HTH John -Original Message- From: Jose Vicente [mailto:[EMAIL PROTE