<html xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:st1="urn:schemas-microsoft-com:office:smarttags" xmlns="http://www.w3.org/TR/REC-html40">

<head>
<meta http-equiv=Content-Type content="text/html; charset=us-ascii">
<meta name=Generator content="Microsoft Word 11 (filtered medium)">
<o:SmartTagType namespaceuri="urn:schemas-microsoft-com:office:smarttags"
 name="PersonName"/>
<!--[if !mso]>
<style>
st1\:*{behavior:url(#default#ieooui) }
</style>
<![endif]-->
<style>
<!--
 /* Font Definitions */
 @font-face
        {font-family:Tahoma;
        panose-1:2 11 6 4 3 5 4 4 2 4;}
 /* Style Definitions */
 p.MsoNormal, li.MsoNormal, div.MsoNormal
        {margin:0in;
        margin-bottom:.0001pt;
        font-size:12.0pt;
        font-family:"Times New Roman";}
a:link, span.MsoHyperlink
        {color:blue;
        text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
        {color:purple;
        text-decoration:underline;}
p.MsoAutoSig, li.MsoAutoSig, div.MsoAutoSig
        {mso-margin-top-alt:auto;
        margin-right:0in;
        mso-margin-bottom-alt:auto;
        margin-left:0in;
        font-size:12.0pt;
        font-family:"Times New Roman";}
span.EmailStyle17
        {mso-style-type:personal-compose;
        font-family:Arial;
        color:windowtext;}
@page Section1
        {size:8.5in 11.0in;
        margin:1.0in 1.25in 1.0in 1.25in;}
div.Section1
        {page:Section1;}
-->
</style>
<!--[if gte mso 9]><xml>
 <o:shapedefaults v:ext="edit" spidmax="1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
 <o:shapelayout v:ext="edit">
  <o:idmap v:ext="edit" data="1" />
 </o:shapelayout></xml><![endif]-->
</head>

<body lang=EN-US link=blue vlink=purple>

<div class=Section1>

<p class=MsoNormal><font size=2 face=Arial><span style='font-size:10.0pt;
font-family:Arial'>$piece =~ s/\t/\&quot;\t\&quot;/g;<o:p></o:p></span></font></p>

<p class=MsoNormal><font size=2 face=Arial><span style='font-size:10.0pt;
font-family:Arial'><o:p>&nbsp;</o:p></span></font></p>

<p class=MsoNormal><font size=2 face=Arial><span style='font-size:10.0pt;
font-family:Arial'>With the above code I&#8217;m searching for all tab
characters and replacing them with a tab surrounded by double-quotes. Is there
a way without putting this in a coding loop, to replace say, only the first three
instances it finds in $piece? It seems like a nice way to do this would to be
able to replace the &#8220;g&#8221; with an integer indicating how many
replacements to do but it doesn&#8217;t seem to work like that &lt;grin&gt;.<o:p></o:p></span></font></p>

<p class=MsoNormal><font size=2 face=Arial><span style='font-size:10.0pt;
font-family:Arial'><o:p>&nbsp;</o:p></span></font></p>

<p class=MsoNormal><font size=2 face=Arial><span style='font-size:10.0pt;
font-family:Arial'>I&#8217;m parsing some columnar data (7 columns) and I want
to put double-quotes around the first six columns. I&#8217;ve figured out a way
to do it but it&#8217;s kind of clumsy. I thought you experts may be able to
show a Perl newbie a more elegant way to do it.<o:p></o:p></span></font></p>

<p class=MsoNormal><font size=2 face=Arial><span style='font-size:10.0pt;
font-family:Arial'><o:p>&nbsp;</o:p></span></font></p>

<p class=MsoNormal><font size=2 face=Arial><span style='font-size:10.0pt;
font-family:Arial'>Thanks,<o:p></o:p></span></font></p>

<p class=MsoNormal><font size=2 face=Arial><span style='font-size:10.0pt;
font-family:Arial'><o:p>&nbsp;</o:p></span></font></p>

<p class=MsoAutoSig style='margin:0in;margin-bottom:.0001pt'><st1:PersonName
w:st="on"><font size=1 color=black face=Tahoma><span style='font-size:8.0pt;
 font-family:Tahoma;color:black'>Barron Snyder</span></font></st1:PersonName><o:p></o:p></p>

<p class=MsoAutoSig style='margin:0in;margin-bottom:.0001pt'><font size=1
color=black face=Tahoma><span style='font-size:8.0pt;font-family:Tahoma;
color:black'>Software Development, Financial Systems Team</span></font><o:p></o:p></p>

<p class=MsoAutoSig style='margin:0in;margin-bottom:.0001pt'><b><font size=1
color=black face=Tahoma><span style='font-size:8.0pt;font-family:Tahoma;
color:black;font-weight:bold'>Whole Foods Market, HQ</span></font></b><o:p></o:p></p>

<p class=MsoNormal><font size=1 color=black face=Tahoma><span style='font-size:
8.0pt;font-family:Tahoma;color:black'><a
href="mailto:barron.snyder@wholefoods.com">barron.snyder@wholefoods.com</a></span></font><o:p></o:p></p>

<p class=MsoNormal><font size=3 face="Times New Roman"><span style='font-size:
12.0pt'>&nbsp;<o:p></o:p></span></font></p>

<p class=MsoNormal><font size=1 color=navy face=Arial><span style='font-size:
8.0pt;font-family:Arial;color:navy'>This email contains proprietary and
confidential material for the sole use of the intended recipient. Any review,
use, distribution or disclosure by others without the permission of the sender
is strictly prohibited. &nbsp;If you are not the intended recipient (or
authorized to receive for the recipient), please contact the sender by reply
email and delete all copies of the message.</span></font><o:p></o:p></p>

<p class=MsoNormal><font size=3 face="Times New Roman"><span style='font-size:
12.0pt'><o:p>&nbsp;</o:p></span></font></p>

</div>

</body>

</html>