in reply to Re^10: String Search
in thread String Search

Look at sub dump_csv_line() at Re^9: String Search (its in second code posting there). That sub with one line in it dumps the data as a CSV line. If you wanted a simple array, then my @array=map{$curr_record{$_}}@csv_order); would do it. I put that single line of csv dump code in a sub all by itself to try to make its function very clear. I guess this wasn't clear enough! Code really didn't need join or map, could have been like this :

#another way to dump values in record foreach my $tag (@csv_order) { print "Tag = $tag value =$curr_record{$tag} \n"; }

Looks like you have two types of data, as per my example run: "DWLCCN6",'6CBFD7'H.... A string or I guess what is a binary hex value. I would assume that if your DB can export the data in that way, it can import that format also! I wouldn't think that your Perl program has to do any data conversion at all!

So for your questions:
1. Code I gave you already processes records. That "dump subroutine" gets called once per record.
2. "fast" is irrelevant..its not gonna make any difference considering the number of days already spent on this!

I still think your best bet is to take the DB guy out for a nice lunch and have him/her write a simple DB merge thing for you. Then you are done!