dsheroh has asked for the wisdom of the Perl Monks concerning the following question:
The actual files present all contain interchanges from the same catalog (lester) to another number, so the obvious solution for this case is to just build three hashes, one for each of the non-lester formats, and use the lester number as the key and the non-lester number as the associated value. I, however, feel compelled to over-engineer the project and not depend on the lester number's presence.
I'm currently thinking that the most sensible way to handle this would be to simply use an array of strings with 4 delimited fields in each string, one field for each catalog's number. They can then be separated easily enough using split, existing entries can be located on any catalog's number by grepping for a simple regex, a sort routine with the ability to sort them on any particular catalog's numbers could be written fairly easily, etc.
The only thing is, it feels like a pretty clumsy design. Anyone have suggestions of a better/cleaner way to do it?
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: 4-way interchange mapping
by JayBonci (Curate) on May 09, 2002 at 21:24 UTC | |
by dsheroh (Monsignor) on May 09, 2002 at 22:57 UTC | |
by JayBonci (Curate) on May 09, 2002 at 23:51 UTC | |
by dsheroh (Monsignor) on May 10, 2002 at 00:24 UTC | |
|
Re: 4-way interchange mapping
by graff (Chancellor) on May 09, 2002 at 22:02 UTC |