<div dir="ltr"><div><div>Unless you have a magical way to escape the comma inside the quoted string, you&#39;re stuck. sed &#39;s/\(&quot;.\+\),\(.\+&quot;\)/\1\\,\2/g&#39; file. Assuming all intermediate strings will be double quoted.<br>
<br></div>Might try splitting to an array instead of individual string vars. Then you can do a length test to see if you got something &quot;extra&quot;.<br>@strings = split(&#39;,&#39; , $String);<br><br></div><div>Be sure to empty the array after each run or loop it as a local variable created each pass.<br>
</div><br></div><div class="gmail_extra"><br><br><div class="gmail_quote">On Thu, Oct 3, 2013 at 5:22 PM, Robert L. Harris <span dir="ltr">&lt;<a href="mailto:robert.l.harris@gmail.com" target="_blank">robert.l.harris@gmail.com</a>&gt;</span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div><br></div>*Sorry for the OT but my only perl lists have gone dark a long time ago*<div><br></div><div>
<br></div><div>$String=&#39;component1,component2,&quot;This is my, test string&quot;, component4&#39;;</div>

<div><br></div><div>($C1, $C2, $Str, $C4) = split(&#39;,&#39;, $String);</div><div><br></div><div>I&#39;m only getting &quot;This is my&quot; in $Str and $C4 does not contain &quot;component4&quot;.  Is there a graceful way of handling this?  It&#39;s a 1 in 10000 chance it&#39;ll break but accuracy counts.</div>
<span class="HOEnZb"><font color="#888888">

<div><br></div><div>Robert</div><div><br clear="all"><div><br></div>-- <br>:wq!<br>---------------------------------------------------------------------------<br>Robert L. Harris<br><br>DISCLAIMER:<br>      These are MY OPINIONS             With Dreams To Be A King,<br>


       ALONE.  I speak for                      First One Should Be A Man<br>       no-one else.                                     - Manowar
</div></font></span></div>
<br>_______________________________________________<br>
Ale mailing list<br>
<a href="mailto:Ale@ale.org">Ale@ale.org</a><br>
<a href="http://mail.ale.org/mailman/listinfo/ale" target="_blank">http://mail.ale.org/mailman/listinfo/ale</a><br>
See JOBS, ANNOUNCE and SCHOOLS lists at<br>
<a href="http://mail.ale.org/mailman/listinfo" target="_blank">http://mail.ale.org/mailman/listinfo</a><br>
<br></blockquote></div><br><br clear="all"><br>-- <br><div dir="ltr">-- <br>James P. Kinney III<br><i><i><i><i><br></i></i></i></i>Every time you stop a school, you will have to build a jail. What you 
        gain at one end you lose at the other. It&#39;s like feeding a dog on his 
        own tail. It won&#39;t fatten the dog.<br>

        - Speech 11/23/1900 Mark Twain<br><i><i><i><i><br><a href="http://heretothereideas.blogspot.com/" target="_blank">http://heretothereideas.blogspot.com/</a><br></i></i></i></i></div>
</div>