Greetings, Perlmonks! I come bearing a conceptual problem. Frankly, it's not something that requires Perl - besides the fact that I'll be coding the solution in Perl - but there's a bunch of smart people here, a number of whom are smart in exactly the ways that this problem needs. I'd be grateful for any help.
Here's the problem: I have a rather large (2MB+) cross-reference stored in a text file that's TSV-formatted and arranged in a grid - labels across the top, cross-referenced numbers across each line. The first column is more or less the reference column: that's what was originally used for looking up the data in the other columns - and the number in that first column can be repeated on several lines if there's more than one cross-referenced product for any given vendor.
The way things used to be done was pretty simple: find the product in the first column, look up the x-refs for all the other vendors. What I'd like to do is to expand that: I want to be able to either 1) select any vendor, enter that vendor's part number, and get all the x-refs from all the vendors for that part, and 2) enter just the part number and be presented with a list of all matches, with vendor names, at which point I'd go back to #1.
I can do a single instance of any of these fairly easily - loop over, build a hash, etc. What I'm having trouble doing is coming up with 1) an efficient way of storing the data (should I reformat/reorganize it for easier lookups, and if so, how? Should I stuff it into a database? Why?) and 2) a usable interface (this latter particularly makes me feel stupid; I'm usually very good at interfaces.) I guess it's only partially a programming problem; mostly, I'm just frustrated at being stuck, and need a push to get past the point of stuckness.
Ideas to get my brain rolling again would be highly and gratefully welcomed. Thanks in advance to all who try.
In reply to Organizing and presenting a cross-reference by oko1
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |