http://www.perlmonks.org?node_id=57110

Stamp_Guy has asked for the wisdom of the Perl Monks concerning the following question:

Here's one that's been puzzling me for a while:
I have a 10,100 item flat-file database. It is pipe deliminated. The first item is a catalog number. I need people to be able to pass two arguements to the script that tell the first and last catalog number that they want to see and have the script print out everything in between - often several hundred results. The main problem is that many entries have the same catalog number but different other fields. I need all the records that contain the first catalog and last catalog to be displayed with the rest.
So basically what I've done so far is used a control number system - numbered the lines of the database and used those numbers instead of the catalog numbers as arguements. This is extremely cumbersome when I have to add or delete an item from the list. Is there any easier way that you guys can think of to do this?