Richard,<div><br></div><div>$_ =~ s/Hello.*,/$ES/g</div><div><br></div><div>should do the trick.  To learn and/or test goto <a href="http://regextester.com">regextester.com</a>.  Here is your example:</div><div><br></div><div>

<img src="cid:ii_12f9c39d7ef5b0ba" alt="re.jpg" title="re.jpg"><br></div><div><br></div><div>ydy</div><div><br></div><div><br><div class="gmail_quote">On Thu, Apr 28, 2011 at 7:34 AM, Richard Reina <span dir="ltr"><<a href="mailto:richard@rushlogistics.com">richard@rushlogistics.com</a>></span> wrote:<br>

<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">I have the code below that replaces the string "Hello," with a scalar $ES which consists of "Hello " . $persons_first_name ",";  It works fine.  However, what I can't figure out is how to make it also substitute a string that already has a first name after hello.  For example, if finds Hello Kim, I want it to replace it with $ES.  Sorry for my ignorance.  Any help would be greatly appreciated.<br>


<br>
Thanks,<br>
<br>
Richard<br>
<br>
sub change_salutation {<br>
<br>
my ($ES) = @_;<br>
<br>
@ARGV = qw(L_FILE);<br>
<br>
$^I="";<br>
<br>
while (<>) {<br>
<br>
   $_ =~ s/Hello,/$ES/g;<br>
   $print $_;<br>
<br>
}<br>
<br>
} # end of sub<br>
<br>
<br>
}<br>
<br>
<br>
}<br>
_______________________________________________<br>
Chicago-talk mailing list<br>
<a href="mailto:Chicago-talk@pm.org">Chicago-talk@pm.org</a><br>
<a href="http://mail.pm.org/mailman/listinfo/chicago-talk" target="_blank">http://mail.pm.org/mailman/listinfo/chicago-talk</a><br>
</blockquote></div><br></div>