in reply to search and delete comma delimited file
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
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: search and delete comma delimited file
by sea (Initiate) on Dec 09, 2004 at 14:13 UTC | |
|
Re^2: search and delete comma delimited file
by jZed (Prior) on Dec 09, 2004 at 14:40 UTC | |
by Popcorn Dave (Abbot) on Dec 10, 2004 at 06:12 UTC |