Another thing you might try - and this is only if your data holds as your examples - is something I did for a stock tracking program. The trick is though that your data is always in the same format. Just split it and grab what you need.

In my case, I'm getting static stocks data from Yahoo Finance and I expect it to be in a certain order, so I just split it, and only take what I'm after. If your data is going to change, then this isn't going to do it for you. HTH

#!/usr/bin/perl use strict; use warnings; my @results; my $relevant; while (<DATA>){ (undef, undef, undef, $relevant) = split ('","',$_); push(@results, $relevant); } print join("\n", @results); __DATA__ "1495107228781574","SomeCompany, Inc.","8335788590132972","kerpow.org" +,"Active","Jan 27 2000 9:02PM","May 1 2004 12:34PM","May 28 2005 2:02 +AM" "1495107228781574","SomeCompany, Inc.","1802975834647670","squish.com" +,"Active","Jul 15 2004 1:49PM","May 2 2004 11:05PM","May 19 2005 11:0 +5PM" "1495107228781574","SomeCompany, Inc.","4430459098697337","wanka.com", +"Active","Nov 9 2004 9:29AM","May 3 2004 2:14PM","May 16 2005 2:14PM" "1495107228781574","SomeCompany, Inc.","2113292909703608","blah.com"," +Active","Jan 16 2003 10:48AM","May 4 2004 12:34PM","May 16 2005 5:48A +M"

Output:

kerpow.org
squish.com
wanka.com
blah.com

Useless trivia: In the 2004 Las Vegas phone book there are approximately 28 pages of ads for massage, but almost 200 for lawyers.

In reply to Re: search and delete comma delimited file by Popcorn Dave
in thread search and delete comma delimited file by sea

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.