Thanks! I like to make more work for myself.
-----Original Message----- From: Wagner, David --- Senior Programmer Analyst --- WGO [mailto:[EMAIL PROTECTED]] Sent: Tuesday, January 21, 2003 3:56 PM To: '[EMAIL PROTECTED]'; Wagner, David --- Senior Programmer Analyst --- WGO; 'Perl' Subject: RE: Pack syntax Paul Kraus wrote: > I have two text files that are exported from our shipping computers > each night. > > One is FedEx and contains a space delimitated file with two fields. > OrderNumber TrackingNumber > > The other is UPS and contains a CSV file with two fields. > "OrderNumber","TrackingNumber" > > I wanted to have a script that would dump both files into a simple 3 > field database. Trackingnumber(key),date,ordernumber. > > I then was going to create a web page that could be used as a front > end to perform searches on these numbers. > > My thinking was to just store them into a packed dmbhash. Seemed > reasonable as I think a full fledge DB would be overkill. > > The problem is that the fields from the two files are of different > lengths meaning my original solution will not work. > > I guess I could create to dbm databases and have them both queried for > the search but that would be to easy. I could also record the length > of the fields in the first 4 characters of the packed string and then > use them as references but that seems messy :) > > XXYYDATA1DATA2 > XX = length of datafield1 > YY = length of datafield2 > > Any other suggestions on a way to handle this? > > Paul Kraus Since you are going to be parsing the data anyway, why not just concatenate together with a say ;, so you would have order#;Trackingnumber. Now for presenting the data, you just split on the ;. I do this, not in a CGI presentation, but when gathering data and hold within a hash. A thoght. Wags ;) ********************************************************** This message contains information that is confidential and proprietary to FedEx Freight or its affiliates. It is intended only for the recipient named and for the express purpose(s) described therein. Any other use is prohibited. **************************************************************** -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]